From 617bbd913dcd6335cfcee3db6d23e8d3262dd566 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 3 Sep 2009 13:03:31 +1000 Subject: allow setting of the debug level in python from C --- source4/param/provision.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/param') diff --git a/source4/param/provision.c b/source4/param/provision.c index c8bff59deb..bbc6837a90 100644 --- a/source4/param/provision.c +++ b/source4/param/provision.c @@ -34,7 +34,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct provision_settings *settings, struct provision_result *result) { - char *configfile; + const char *configfile; PyObject *provision_mod, *provision_dict, *provision_fn, *py_result, *parameters; DEBUG(0,("Provision for Become-DC test using python\n")); @@ -123,6 +123,9 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, PyDict_SetItemString(parameters, "machinepass", PyString_FromString(settings->machine_password)); + + PyDict_SetItemString(parameters, "debuglevel", PyInt_FromLong(DEBUGLEVEL)); + py_result = PyEval_CallObjectWithKeywords(provision_fn, NULL, parameters); Py_DECREF(parameters); -- cgit