summaryrefslogtreecommitdiff
path: root/examples/libsmbclient/testbrowse.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/libsmbclient/testbrowse.c')
-rw-r--r--examples/libsmbclient/testbrowse.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/examples/libsmbclient/testbrowse.c b/examples/libsmbclient/testbrowse.c
index 562d2c2aeb..a7eda365af 100644
--- a/examples/libsmbclient/testbrowse.c
+++ b/examples/libsmbclient/testbrowse.c
@@ -108,24 +108,21 @@ main(int argc, char * argv[])
}
/* Set mandatory options (is that a contradiction in terms?) */
- context->debug = debug;
+ smbc_setDebug(context, debug);
if (context_auth) {
- context->callbacks.auth_fn = NULL;
- smbc_option_set(context,
- "auth_function",
- (void *) get_auth_data_with_context_fn);
- smbc_option_set(context, "user_data", "hello world");
+ smbc_setFunctionAuthDataWithContext(context,
+ get_auth_data_with_context_fn);
+ smbc_setOptionUserData(context, "hello world");
} else {
- context->callbacks.auth_fn =
- (no_auth ? no_auth_data_fn : get_auth_data_fn);
+ smbc_setFunctionAuthData(context, get_auth_data_fn);
}
/* If we've been asked to log to stderr instead of stdout, ... */
if (debug_stderr) {
/* ... then set the option to do so */
- smbc_option_set(context, "debug_to_stderr", 1);
+ smbc_setOptionDebugToStderr(context, 1);
}
-
+
/* Initialize the context using the previously specified options */
if (!smbc_init_context(context)) {
smbc_free_context(context, 0);
@@ -199,7 +196,7 @@ get_auth_data_with_context_fn(SMBCCTX * context,
{
printf("Authenticating with context 0x%lx", context);
if (context != NULL) {
- char *user_data = smbc_option_get(context, "user_data");
+ char *user_data = smbc_getOptionUserData(context);
printf(" with user data %s", user_data);
}
printf("\n");