s4: Call va_end() after all va_start()/va_copy() calls.
[samba.git] / examples / libsmbclient / testbrowse.c
index 1b0b54f9f029d0a17427bc2664fbfb464fbd4745..c3fb3946dab92ec8b41b9a9ee63d6dd8015d35a2 100644 (file)
@@ -117,12 +117,15 @@ main(int argc, char * argv[])
         smbc_setFunctionAuthData(context, get_auth_data_fn);
     }
 
+    smbc_setOptionUseKerberos(context, 1);
+    smbc_setOptionFallbackAfterKerberos(context, 1);
+
     /* 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);
@@ -194,9 +197,9 @@ get_auth_data_with_context_fn(SMBCCTX * context,
                               char * pPassword,
                               int maxLenPassword)
 {
-    printf("Authenticating with context 0x%lx", context);
+    printf("Authenticating with context %p", 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");