summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-21 17:59:08 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-21 17:59:08 +0200
commitdb30ff4bea11f6612bd68c934ba31387ad99cefc (patch)
tree57e1b48e01ba4172ead0158259558dc1936e49c1 /source4/pidl/lib/Parse
parent61fba825940b03ac954208cc0ead4ed2c0af848a (diff)
downloadsamba-db30ff4bea11f6612bd68c934ba31387ad99cefc.tar.gz
samba-db30ff4bea11f6612bd68c934ba31387ad99cefc.tar.bz2
samba-db30ff4bea11f6612bd68c934ba31387ad99cefc.zip
Load default smb.conf file if none was specified explicitly.
(This used to be commit 8fa23fac516dbf4c8245c1d009e81f02a6341775)
Diffstat (limited to 'source4/pidl/lib/Parse')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Python.pm8
1 files changed, 2 insertions, 6 deletions
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);");