Last change
on this file was 745, checked in by Silvan Scherrer, 13 years ago |
Samba Server: updated trunk to 3.6.0
|
File size:
757 bytes
|
Rev | Line | |
---|
[745] | 1 | #include <libsmbclient.h>
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 |
|
---|
| 5 | void 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 |
|
---|
| 27 | int 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.