The Samba-Bugzilla – Attachment 10886 Details for
Bug 11079
libsmbclient not checking the cached connection alive status before re-using it from connection cache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Test case as reproducer.
smbstat.c (text/plain), 1.17 KB, created by
Jeremy Allison
on 2015-03-18 21:30:59 UTC
(
hide
)
Description:
Test case as reproducer.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2015-03-18 21:30:59 UTC
Size:
1.17 KB
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <string.h> >#include <time.h> >#include <libsmbclient.h> > >static void >get_auth_data_fn(const char * pServer, > const char * pShare, > char * pWorkgroup, > int maxLenWorkgroup, > char * pUsername, > int maxLenUsername, > char * pPassword, > int maxLenPassword) >{ > strcpy(pUsername, "USER"); > strcpy(pPassword, "PASSWORD"); >} > >static void do_stat(void) >{ > char m_time[32]; > char c_time[32]; > char a_time[32]; > struct stat st; > > if (smbc_stat("smb://127.0.0.1/tmp/a", &st) < 0) > { > perror("smbc_stat"); > fprintf(stderr, "SMBC_STAT failed\n"); > exit(1); > } else { > printf("\nSAMBA\n mtime:%lu/%s ctime:%lu/%s atime:%lu/%s\n", > st.st_mtime, ctime_r(&st.st_mtime, m_time), > st.st_ctime, ctime_r(&st.st_ctime, c_time), > st.st_atime, ctime_r(&st.st_atime, a_time)); > } >} > >int main(int argc, char * argv[]) >{ > smbc_init(get_auth_data_fn, 10); > > do_stat(); > sleep(130); > do_stat(); > do_stat(); > do_stat(); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11079
:
10676
|
10690
|
10884
| 10886 |
10888
|
10889
|
10898