r15288: fix some problems
authorSimo Sorce <idra@samba.org>
Wed, 26 Apr 2006 16:52:45 +0000 (16:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:02 +0000 (14:05 -0500)
source/libcli/ldap/ldap_client.c

index 74ac64a68dfa2915ffaddbda110f4a956e03b12e..27cab3891619d45c49a23a179eb6e798fa48443b 100644 (file)
@@ -88,7 +88,7 @@ static void ldap_connection_dead(struct ldap_connection *conn)
        }       
 
        talloc_free(conn->tls);
-       talloc_free(conn->sock); /* this will also free event.fde */
+/*     talloc_free(conn->sock);  this will also free event.fde */
        talloc_free(conn->packet);
        conn->tls = NULL;
        conn->sock = NULL;
@@ -621,7 +621,7 @@ failed:
 */
 NTSTATUS ldap_request_wait(struct ldap_request *req)
 {
-       while (req->state <= LDAP_REQUEST_DONE) {
+       while (req->state < LDAP_REQUEST_DONE) {
                if (event_loop_once(req->conn->event.event_ctx) != 0) {
                        req->status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
                        break;
@@ -734,7 +734,7 @@ NTSTATUS ldap_result_n(struct ldap_request *req, int n, struct ldap_message **ms
 
        NT_STATUS_HAVE_NO_MEMORY(req);
 
-       while (req->state <= LDAP_REQUEST_DONE && n >= req->num_replies) {
+       while (req->state < LDAP_REQUEST_DONE && n >= req->num_replies) {
                if (event_loop_once(req->conn->event.event_ctx) != 0) {
                        return NT_STATUS_UNEXPECTED_NETWORK_ERROR;
                }