mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
pyldb: py_ldb_msg_contains() checks ldb equality
We can't use PyErr_LDB_MESSAGE_OR_RAISE() here, because the return type is int, not PyObject*. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
acba42b126
commit
b5fcc55b5e
@ -3770,7 +3770,13 @@ static int py_ldb_msg_contains(PyLdbMessageObject *self, PyObject *py_name)
|
||||
{
|
||||
struct ldb_message_element *el = NULL;
|
||||
const char *name = NULL;
|
||||
struct ldb_message *msg = pyldb_Message_AsMessage(self);
|
||||
struct ldb_message *msg = pyldb_Message_as_message(self);
|
||||
struct ldb_dn *dn = msg->dn;
|
||||
|
||||
if (dn != NULL && (self->pyldb->ldb_ctx != ldb_dn_get_ldb_context(dn))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
name = PyUnicode_AsUTF8(py_name);
|
||||
if (name == NULL) {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user