mirror of
https://github.com/samba-team/samba.git
synced 2025-11-27 08:23:49 +03:00
r12579: r12122@cabra: derrell | 2005-12-29 12:03:00 -0500
allow for arbitrary option value types
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
4182eb99af
commit
64c8e32b63
@@ -89,7 +89,7 @@ main(int argc, char * argv[])
|
|||||||
/* If we've been asked to log to stderr instead of stdout... */
|
/* If we've been asked to log to stderr instead of stdout... */
|
||||||
if (debug_stderr) {
|
if (debug_stderr) {
|
||||||
/* ... then set the option to do so */
|
/* ... 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 */
|
/* Initialize the context using the previously specified options */
|
||||||
|
|||||||
@@ -5947,14 +5947,22 @@ smbc_free_context(SMBCCTX *context,
|
|||||||
void
|
void
|
||||||
smbc_option_set(SMBCCTX *context,
|
smbc_option_set(SMBCCTX *context,
|
||||||
char *option_name,
|
char *option_name,
|
||||||
void *option_value)
|
...)
|
||||||
{
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start(args, option_name);
|
||||||
|
|
||||||
if (strcmp(option_name, "debug_stderr") == 0) {
|
if (strcmp(option_name, "debug_stderr") == 0) {
|
||||||
/*
|
/*
|
||||||
* Log to standard error instead of standard output.
|
* Log to standard error instead of standard output.
|
||||||
|
*
|
||||||
|
* optional parameters: none (it can't be turned off once on)
|
||||||
*/
|
*/
|
||||||
context->internal->_debug_stderr = True;
|
context->internal->_debug_stderr = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user