diff options
-rw-r--r-- | proxy.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -854,6 +854,7 @@ static BOOL proxy_clientSearchRequest(epoll_client_t *client, const unsigned lon } const BOOL ret = proxy_localSearchRequest(client, messageId, &req); free_ldapsearchrequest(&req); + plog(DEBUG_TRACE, "[Client] Result: %d\n", (int)ret); return ret; } // Forward @@ -1131,13 +1132,13 @@ static BOOL proxy_localSearchRequest(epoll_client_t *client, const unsigned long } else { plog(DEBUG_VERBOSE, "[Proxy] Sending empty posixGroup search result to client."); } - const size_t doneLen = fmt_ldapsearchresultdone(NULL, success, "", "", ""); - const size_t doneHeaderLen = fmt_ldapmessage(NULL, messageId, SearchResultDone, doneLen); - char buffer[doneLen + doneHeaderLen]; - fmt_ldapsearchresultdone(buffer + doneHeaderLen, success, "", "", ""); - fmt_ldapmessage(buffer, messageId, SearchResultDone, doneLen); - return client_send(client, buffer, doneHeaderLen + doneLen, FALSE); } - return FALSE; + // Always send SearchResultDone here, so if we have no match above it results in + // an empty reply. + const size_t doneLen = fmt_ldapsearchresultdone(NULL, success, "", "", ""); + const size_t doneHeaderLen = fmt_ldapmessage(NULL, messageId, SearchResultDone, doneLen); + char buffer[doneLen + doneHeaderLen]; + fmt_ldapsearchresultdone(buffer + doneHeaderLen, success, "", "", ""); + fmt_ldapmessage(buffer, messageId, SearchResultDone, doneLen); + return client_send(client, buffer, doneHeaderLen + doneLen, FALSE); } - |