/* 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 */
if (!smbc_init_context(context)) {
smbc_free_context(context, 0);
{
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");