source: vendor/current/examples/libsmbclient/testctx.c@ 740

Last change on this file since 740 was 740, checked in by Silvan Scherrer, 12 years ago

Samba Server: update vendor to 3.6.0

File size: 757 bytes
Line 
1#include <libsmbclient.h>
2#include <stdlib.h>
3#include <stdio.h>
4
5void create_and_destroy_context (void)
6{
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);
18 }
19 if (!smbc_getOptionDebugToStderr(ctx)) {
20 printf("smbc_setOptionDebugToStderr() did not stick\n");
21 exit(1);
22 }
23 smbc_init_context (ctx);
24 smbc_free_context (ctx, 1);
25}
26
27int main (int argc, char **argv)
28{
29 create_and_destroy_context ();
30 create_and_destroy_context ();
31 return 0;
32}
Note: See TracBrowser for help on using the repository browser.