Add documentation for the new -t <timeout> parameter in smbclient.
[Samba.git] / examples / libsmbclient / testctx.c
blobcec9776ced2445bf1cb64804df5281e755a091d1
1 #include <libsmbclient.h>
2 #include <stdlib.h>
3 #include <stdio.h>
5 void create_and_destroy_context (void)
7 int i;
8 SMBCCTX *ctx;
9 ctx = smbc_new_context ();
10 /* Both should do the same thing */
11 smbc_setOptionDebugToStderr(ctx, 1);
12 smbc_option_set(ctx, "debug_to_stderr", 1);
13 smbc_setDebug(ctx, 1);
14 i = smbc_getDebug(ctx);
15 if (i != 1) {
16 printf("smbc_getDebug() did not return debug level set\n");
17 exit(1);
19 if (!smbc_getOptionDebugToStderr(ctx)) {
20 printf("smbc_setOptionDebugToStderr() did not stick\n");
21 exit(1);
23 smbc_init_context (ctx);
24 smbc_free_context (ctx, 1);
27 int main (int argc, char **argv)
29 create_and_destroy_context ();
30 create_and_destroy_context ();
31 return 0;