diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-08-03 12:51:00 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-08-03 13:55:04 -0400 |
commit | 68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d (patch) | |
tree | d78acadf06f3e205d4ff5b4d707c439c73642bd1 /server/providers/ldap | |
parent | 3f21b54146399bdf3e2a56b8466dc95c3b70283e (diff) | |
download | sssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.tar.gz sssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.tar.bz2 sssd-68f38d6713d4d0faec3364e4ce1fc0bbf1454f7d.zip |
Fix search replies getting ignored
Diffstat (limited to 'server/providers/ldap')
-rw-r--r-- | server/providers/ldap/sdap_async.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c index 762cd5ab..ef58f390 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 |