]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/result.c
Backout the input exhaustion change, it loops. Still looking for
[openldap] / servers / slapd / result.c
index 246a00776413aa7e1403ab024b71ff630e1ab054..514a0724e8fa14a2c08242ab2b31a1d5130e932b 100644 (file)
@@ -342,7 +342,7 @@ send_ldap_disconnect(
 
        Statslog( LDAP_DEBUG_STATS,
            "conn=%ld op=%ld DISCONNECT err=%ld tag=%lu text=%s\n",
-               (long) conn->c_connid, (long) op->o_opid,
+               (long) op->o_connid, (long) op->o_opid,
                (long) tag, (long) err, text );
 }
 
@@ -363,7 +363,9 @@ send_ldap_result(
 
        assert( !LDAP_API_ERROR( err ) );
 
-       Debug( LDAP_DEBUG_TRACE, "send_ldap_result %d:%s:%s\n",
+       Debug( LDAP_DEBUG_TRACE, "send_ldap_result: conn=%ld op=%ld p=%d\n",
+               (long) op->o_connid, (long) op->o_opid, op->o_protocol );
+       Debug( LDAP_DEBUG_ARGS, "send_ldap_result: %d:%s:%s\n",
                err, matched ?  matched : "", text ? text : "" );
 
        assert( err != LDAP_PARTIAL_RESULTS );
@@ -402,7 +404,7 @@ send_ldap_result(
 
        Statslog( LDAP_DEBUG_STATS,
            "conn=%ld op=%ld RESULT err=%ld tag=%lu text=%s\n",
-               (long) conn->c_connid, (long) op->o_opid,
+               (long) op->o_connid, (long) op->o_opid,
                (long) err, (long) tag, text );
 
        if( tmp != NULL ) {
@@ -439,15 +441,18 @@ send_search_result(
                /* send references in search results */
                if( err == LDAP_REFERRAL ) {
                        err = LDAP_PARTIAL_RESULTS;
-                       tmp = text = v2ref( refs );
-                       refs = NULL;
                }
 
+               tmp = text = v2ref( refs );
+               refs = NULL;
+
        } else {
                /* don't send references in search results */
+               assert( refs == NULL );
+               refs = NULL;
+
                if( err == LDAP_REFERRAL ) {
                        err = LDAP_SUCCESS;
-                       refs = NULL;
                }
        }
 
@@ -471,7 +476,7 @@ send_search_result(
 
        Statslog( LDAP_DEBUG_STATS,
            "conn=%ld op=%ld SEARCH RESULT err=%ld tag=%lu text=%s\n",
-               (long) conn->c_connid, (long) op->o_opid,
+               (long) op->o_connid, (long) op->o_opid,
                (long) err, (long) tag, text );
 
 }
@@ -492,7 +497,7 @@ send_search_entry(
        BerElement      *ber;
        Attribute       *a;
        int             i, rc=-1, bytes;
-       struct acl      *acl;
+       AccessControl   *acl;
        char            *edn;
        int             allattrs;