From db30ff4bea11f6612bd68c934ba31387ad99cefc Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Apr 2008 17:59:08 +0200 Subject: Load default smb.conf file if none was specified explicitly. (This used to be commit 8fa23fac516dbf4c8245c1d009e81f02a6341775) --- source4/pidl/lib/Parse/Pidl/Samba4/Python.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source4/pidl/lib') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm index 2d12da358c..e344589f8e 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -597,7 +597,7 @@ sub Interface($$$) $self->pidl("const char *binding_string;"); $self->pidl("struct cli_credentials *credentials;"); $self->pidl("struct loadparm_context *lp_ctx = NULL;"); - $self->pidl("PyObject *py_lp_ctx = NULL, *py_credentials = Py_None;"); + $self->pidl("PyObject *py_lp_ctx = Py_None, *py_credentials = Py_None;"); $self->pidl("TALLOC_CTX *mem_ctx = NULL;"); $self->pidl("NTSTATUS status;"); $self->pidl(""); @@ -609,14 +609,12 @@ sub Interface($$$) $self->pidl("extern struct loadparm_context *lp_from_py_object(PyObject *py_obj);"); $self->pidl("extern struct cli_credentials *cli_credentials_from_py_object(PyObject *py_obj);"); $self->pidl(""); - $self->pidl("if (!PyArg_ParseTupleAndKeywords(args, kwargs, \"sO|O:$interface->{NAME}\", discard_const_p(char *, kwnames), &binding_string, &py_lp_ctx, &py_credentials)) {"); + $self->pidl("if (!PyArg_ParseTupleAndKeywords(args, kwargs, \"s|OO:$interface->{NAME}\", discard_const_p(char *, kwnames), &binding_string, &py_lp_ctx, &py_credentials)) {"); $self->indent; $self->pidl("return NULL;"); $self->deindent; $self->pidl("}"); $self->pidl(""); - $self->pidl("if (py_lp_ctx != NULL) {"); - $self->indent; $self->pidl("lp_ctx = lp_from_py_object(py_lp_ctx);"); $self->pidl("if (lp_ctx == NULL) {"); $self->indent; @@ -624,8 +622,6 @@ sub Interface($$$) $self->pidl("return NULL;"); $self->deindent; $self->pidl("}"); - $self->deindent; - $self->pidl("}"); $self->pidl(""); $self->pidl("credentials = cli_credentials_from_py_object(py_credentials);"); -- cgit