summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-03 12:51:00 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-03 13:55:04 -0400
commit68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d (patch)
treed78acadf06f3e205d4ff5b4d707c439c73642bd1
parent3f21b54146399bdf3e2a56b8466dc95c3b70283e (diff)
downloadsssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.tar.gz
sssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.tar.xz
sssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.zip
Fix search replies getting ignored
-rw-r--r--server/providers/ldap/sdap_async.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c
index 762cd5abb..ef58f3900 100644
--- a/server/providers/ldap/sdap_async.c
+++ b/server/providers/ldap/sdap_async.c
@@ -215,6 +215,9 @@ static void sdap_process_message(struct sdap_handle *sh, LDAPMessage *msg)
switch (msgtype) {
case LDAP_RES_SEARCH_ENTRY:
+ /* go and process entry */
+ break;
+
case LDAP_RES_SEARCH_REFERENCE:
/* more ops to come with this msgid */
/* just ignore */
@@ -232,7 +235,6 @@ static void sdap_process_message(struct sdap_handle *sh, LDAPMessage *msg)
case LDAP_RES_INTERMEDIATE:
/* no more results expected with this msgid */
op->done = true;
- ret = EOK;
break;
default:
@@ -242,21 +244,17 @@ static void sdap_process_message(struct sdap_handle *sh, LDAPMessage *msg)
return;
}
- if (ret == EOK) {
- reply = talloc(op, struct sdap_msg);
- if (!reply) {
+ reply = talloc(op, struct sdap_msg);
+ if (!reply) {
+ ldap_msgfree(msg);
+ ret = ENOMEM;
+ } else {
+ reply->msg = msg;
+ ret = sdap_msg_attach(reply, msg);
+ if (ret != EOK) {
ldap_msgfree(msg);
- ret = ENOMEM;
- } else {
- reply->msg = msg;
- ret = sdap_msg_attach(reply, msg);
- if (ret != EOK) {
- ldap_msgfree(msg);
- talloc_zfree(reply);
- }
+ talloc_zfree(reply);
}
- } else {
- reply = NULL;
}
/* must be the last operation as it may end up freeing all memory