diff options
author | Tim Potter <tpot@samba.org> | 2002-04-11 05:05:08 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-04-11 05:05:08 +0000 |
commit | 094a51edb9369f5c493bddfdc98347431bea3c2d (patch) | |
tree | 37a545a70ba3941ae649773306467420e7af4d80 /source/python/py_spoolss.c | |
parent | 6c7b5e15c22119623ee959267d2755e21193bc4b (diff) | |
download | samba-094a51edb9369f5c493bddfdc98347431bea3c2d.tar.gz samba-094a51edb9369f5c493bddfdc98347431bea3c2d.tar.xz samba-094a51edb9369f5c493bddfdc98347431bea3c2d.zip |
Implemented a setup_logging() function that takes two keywords:
interactive and logfilename. These can be used to send Samba DEBUG()
output to stdout or to a logfile which makes automated testing much
funkier.
Also added get_debuglevel() and set_debuglevel() functions.
Make open_pipe_creds() accept None as a anonymous credential.
Diffstat (limited to 'source/python/py_spoolss.c')
-rw-r--r-- | source/python/py_spoolss.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/python/py_spoolss.c b/source/python/py_spoolss.c index b3087deef79..ead54febda2 100644 --- a/source/python/py_spoolss.c +++ b/source/python/py_spoolss.c @@ -48,7 +48,7 @@ struct cli_state *open_pipe_creds(char *system_name, PyObject *creds, ZERO_STRUCT(nt_creds); nt_creds.pwd.null_pwd = True; - if (creds) { + if (creds && PyDict_Size(creds) > 0) { char *username, *password, *domain; PyObject *username_obj, *password_obj, *domain_obj; @@ -187,6 +187,15 @@ Return the printer driver directory for a given architecture. The architecture defaults to \"Windows NT x86\". "}, + /* Other stuff - this should really go into a samba config module + but for the moment let's leave it here. */ + + { "setup_logging", py_setup_logging, METH_VARARGS | METH_KEYWORDS, + "" }, + + { "get_debuglevel", get_debuglevel, METH_VARARGS, "" }, + { "set_debuglevel", set_debuglevel, METH_VARARGS, "" }, + { NULL } }; |