diff options
author | Simo Sorce <idra@samba.org> | 2003-08-02 20:06:57 +0000 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2003-08-02 20:06:57 +0000 |
commit | 04bf12b176d5abe06b7f1401810369bcafe0b611 (patch) | |
tree | 8bb6627c3ffa4cab902787b874206f8012a33e3a /source3/python/py_smb.c | |
parent | 7efce478976e2ac71bcaf4e4d1049bb263634711 (diff) | |
download | samba-04bf12b176d5abe06b7f1401810369bcafe0b611.tar.gz samba-04bf12b176d5abe06b7f1401810369bcafe0b611.tar.bz2 samba-04bf12b176d5abe06b7f1401810369bcafe0b611.zip |
port latest changes from SAMBA_3_0 tree
(This used to be commit 3101c236b8241dc0183995ffceed551876427de4)
Diffstat (limited to 'source3/python/py_smb.c')
-rw-r--r-- | source3/python/py_smb.c | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/source3/python/py_smb.c b/source3/python/py_smb.c index d37b73cceb..bb84a337c9 100644 --- a/source3/python/py_smb.c +++ b/source3/python/py_smb.c @@ -238,7 +238,8 @@ static PyObject *py_smb_query_secdesc(PyObject *self, PyObject *args, if (cli_is_error(cli->cli)) { PyErr_SetString(PyExc_RuntimeError, "query_secdesc failed"); - return NULL; + result = NULL; + goto done; } if (!secdesc) { @@ -342,11 +343,48 @@ static PyMethodDef smb_methods[] = { { "connect", (PyCFunction)py_smb_connect, METH_VARARGS | METH_KEYWORDS, "Connect to a host" }, + /* Other stuff - this should really go into a samba config module + but for the moment let's leave it here. */ + + { "setup_logging", (PyCFunction)py_setup_logging, + METH_VARARGS | METH_KEYWORDS, + "Set up debug logging.\n" +"\n" +"Initialises Samba's debug logging system. One argument is expected which\n" +"is a boolean specifying whether debugging is interactive and sent to stdout\n" +"or logged to a file.\n" +"\n" +"Example:\n" +"\n" +">>> smb.setup_logging(interactive = 1)" }, + + { "get_debuglevel", (PyCFunction)get_debuglevel, + METH_VARARGS, + "Set the current debug level.\n" +"\n" +"Example:\n" +"\n" +">>> smb.get_debuglevel()\n" +"0" }, + + { "set_debuglevel", (PyCFunction)set_debuglevel, + METH_VARARGS, + "Get the current debug level.\n" +"\n" +"Example:\n" +"\n" +">>> smb.set_debuglevel(10)" }, + { NULL } }; static void py_cli_state_dealloc(PyObject* self) { + cli_state_object *cli = (cli_state_object *)self; + + if (cli->cli) + cli_shutdown(cli->cli); + PyObject_Del(self); } @@ -395,5 +433,5 @@ void initsmb(void) py_samba_init(); setup_logging("smb", True); - DEBUGLEVEL = 10; + DEBUGLEVEL = 3; } |