+ context->internal->_debug_stderr =
+ (option_value == NULL ? False : True);
+ } else if (strcmp(option_name, "auth_function") == 0) {
+ /*
+ * Use the new-style authentication function which includes
+ * the context.
+ */
+ context->internal->_auth_fn_with_context = option_value;
+ } else if (strcmp(option_name, "user_data") == 0) {
+ /*
+ * Save a user data handle which may be retrieved by the user
+ * with smbc_option_get()
+ */
+ context->internal->_user_data = option_value;
+ }
+}
+
+
+/*
+ * Retrieve the current value of an option
+ */
+void *
+smbc_option_get(SMBCCTX *context,
+ char *option_name)
+{
+ if (strcmp(option_name, "debug_stderr") == 0) {
+ /*
+ * Log to standard error instead of standard output.
+ */
+ return (void *) context->internal->_debug_stderr;
+ } else if (strcmp(option_name, "auth_function") == 0) {
+ /*
+ * Use the new-style authentication function which includes
+ * the context.
+ */
+ return (void *) context->internal->_auth_fn_with_context;
+ } else if (strcmp(option_name, "user_data") == 0) {
+ /*
+ * Save a user data handle which may be retrieved by the user
+ * with smbc_option_get()
+ */
+ return context->internal->_user_data;