diff options
author | Tim Potter <tpot@samba.org> | 2006-04-03 08:25:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:00:11 -0500 |
commit | aae53f673fa177f5a7517e56d1f95d153f39cf40 (patch) | |
tree | f7b90f70d46f2d98db8397554f80cdafef09d40a /source4/scripting | |
parent | 574c9fd6854b743b8727af5f53cc184552446e4d (diff) | |
download | samba-aae53f673fa177f5a7517e56d1f95d153f39cf40.tar.gz samba-aae53f673fa177f5a7517e56d1f95d153f39cf40.tar.bz2 samba-aae53f673fa177f5a7517e56d1f95d153f39cf40.zip |
r14879: Fix bug unpacking ldb_messages.
Start decoding more of ldb_message and ldb_message_result.
(This used to be commit 60f7f14baa7ff212138ac2349b94d56918566f73)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/swig/ldb.i | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/scripting/swig/ldb.i b/source4/scripting/swig/ldb.i index f7c3b5d709..12053d6ac9 100644 --- a/source4/scripting/swig/ldb.i +++ b/source4/scripting/swig/ldb.i @@ -113,12 +113,23 @@ enum ldb_scope {LDB_SCOPE_DEFAULT=-1, resultobj = PyList_New((*$1)->count); for (i = 0; i < (*$1)->count; i++) { - PyList_SetItem(resultobj, i, SWIG_NewPointerObj(*$1, SWIGTYPE_p_ldb_message, 0)); + PyList_SetItem(resultobj, i, SWIG_NewPointerObj((*$1)->msgs[i], SWIGTYPE_p_ldb_message, 0)); } } %types(struct ldb_result *); +%typemap(out) struct ldb_dn * { + $result = PyString_FromString(ldb_dn_linearize($1, $1)); +} + +struct ldb_message_element { + unsigned int flags; + const char *name; + unsigned int num_values; + struct ldb_val *values; +}; + struct ldb_message { struct ldb_dn *dn; unsigned int num_elements; |