diff options
author | Derrell Lipman <derrell@samba.org> | 2005-12-29 17:03:39 +0000 |
---|---|---|
committer | Derrell Lipman <derrell@samba.org> | 2005-12-29 17:03:39 +0000 |
commit | 3e7b17c5c71df1ebd250b0296cf80ca461469822 (patch) | |
tree | 2475fd496f646ff73948010baf28bf7ff675cf2d | |
parent | 997a09dff8148d52ee522583e27ccfa01a06c8c3 (diff) | |
download | samba-3e7b17c5c71df1ebd250b0296cf80ca461469822.tar.gz samba-3e7b17c5c71df1ebd250b0296cf80ca461469822.tar.xz samba-3e7b17c5c71df1ebd250b0296cf80ca461469822.zip |
r12579: r12122@cabra: derrell | 2005-12-29 12:03:00 -0500
allow for arbitrary option value types
-rw-r--r-- | examples/libsmbclient/testbrowse.c | 2 | ||||
-rw-r--r-- | source/libsmb/libsmbclient.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/examples/libsmbclient/testbrowse.c b/examples/libsmbclient/testbrowse.c index eba6fff4ebf..b5337ae983a 100644 --- a/examples/libsmbclient/testbrowse.c +++ b/examples/libsmbclient/testbrowse.c @@ -89,7 +89,7 @@ main(int argc, char * argv[]) /* 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_stderr", NULL); + smbc_option_set(context, "debug_stderr"); } /* Initialize the context using the previously specified options */ diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 6eca3946d8f..51f94e42e37 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -5947,14 +5947,22 @@ smbc_free_context(SMBCCTX *context, void smbc_option_set(SMBCCTX *context, char *option_name, - void *option_value) + ...) { + va_list args; + + va_start(args, option_name); + if (strcmp(option_name, "debug_stderr") == 0) { /* * Log to standard error instead of standard output. + * + * optional parameters: none (it can't be turned off once on) */ context->internal->_debug_stderr = True; } + + va_end(args); } |