The Samba-Bugzilla – Attachment 10624 Details for
Bug 10123
libsmbclient referral issue with Windows DFS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
simple test, based on examples/libsmbclient/teststat3.c
teststat3.c (text/plain), 1.25 KB, created by
David Disseldorp
on 2015-01-16 13:28:45 UTC
(
hide
)
Description:
simple test, based on examples/libsmbclient/teststat3.c
Filename:
MIME Type:
Creator:
David Disseldorp
Created:
2015-01-16 13:28:45 UTC
Size:
1.25 KB
patch
obsolete
>#include <libsmbclient.h> >#include <sys/stat.h> >#include <string.h> >#include <stdio.h> >#include <time.h> >#include "get_auth_data_fn.h" > >/* > * This test is intended to ensure that the timestamps returned by > * libsmbclient using smbc_stat() are the same as those returned by > * smbc_fstat(). > */ > >#define COMPARE(_st1, _st2, field) \ > if (_st1.field != _st2.field) { \ > printf("Field " #field " MISMATCH: st1=%lu, st2=%lu\n", \ > (unsigned long) _st1.field, \ > (unsigned long) _st2.field); \ > } > >int main(int argc, char* argv[]) >{ > int fd; > struct stat st1; > struct stat st2; > char * url = argv[1]; > int i; > > if(argc != 2) > { > printf("usage: %s <file_url>\n", argv[0]); > return 1; > } > > > smbc_init(get_auth_data_fn, 0); > > if ((fd = smbc_open(url, O_RDONLY, 0)) < 0) > { > perror("smbc_open"); > return 1; > } > > for (i = 0; i < 100; i++) { > > if (smbc_fstat(fd, &st2) < 0) > { > perror("smbc_fstat"); > return 1; > } > } > > smbc_close(fd); > > > 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 10123
:
9785
|
10620
| 10624 |
10632
|
10633
|
10634
|
10635