Remove use of deprecated function
[gd/samba/.git] / examples / libsmbclient / testbrowse.c
index 495cf0fbec033f9dbccccdb9986515821db7edc3..c4ca6667e01a9cc4dd1381608b815f9f03f8446a 100644 (file)
@@ -109,27 +109,18 @@ main(int argc, char * argv[])
 
     /* Set mandatory options (is that a contradiction in terms?) */
     smbc_setDebug(context, debug);
-#if 0
     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);
     }
-#else
-#warning "temporarily remove setting alternate auth function"
-    smbc_setFunctionAuthData(context, 
-                             (no_auth ? no_auth_data_fn : get_auth_data_fn));
-#endif
 
     /* 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 */
@@ -205,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");