]> git.sur5r.net Git - openldap/commitdiff
Reflect latest changes
authorKurt Zeilenga <kurt@openldap.org>
Fri, 26 Mar 2004 00:06:26 +0000 (00:06 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 26 Mar 2004 00:06:26 +0000 (00:06 +0000)
CHANGES
libraries/libldap/result.c

diff --git a/CHANGES b/CHANGES
index 9b6a5ddc563bcdfd84e9cf5f89db99a2377bd96d..5c2aad62e0bf8b4336682500c7fce39551cdcd97 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
 OpenLDAP 2.2 Change Log
 
 OpenLDAP 2.2.7 Engineering
+       Fixed slapd syncrepl bugs (ITS#2948,2995)
+       Fixed slapd bind method portability bug (ITS#3038)
+       Fixed libldap try_read1msg bug (ITS#2982)
        Added slurpd replication interval config option (ITS#2768)
        Build Environment
                Fixed shared library soname issues (ITS#3035)
index 0614f41be9b839e20db8db7b033c24ca1c16a851..dbf75ee1409054ac813619cb78f4f097a0110f33 100644 (file)
@@ -73,7 +73,7 @@ static int ldap_mark_abandoned LDAP_P(( LDAP *ld, ber_int_t msgid ));
 static int wait4msg LDAP_P(( LDAP *ld, ber_int_t msgid, int all, struct timeval *timeout,
        LDAPMessage **result ));
 static ber_tag_t try_read1msg LDAP_P(( LDAP *ld, ber_int_t msgid,
-       int all, Sockbuf *sb, LDAPConn *lc, LDAPMessage **result ));
+       int all, Sockbuf *sb, LDAPConn **lc, LDAPMessage **result ));
 static ber_tag_t build_result_ber LDAP_P(( LDAP *ld, BerElement **bp, LDAPRequest *lr ));
 static void merge_error_info LDAP_P(( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ));
 static LDAPMessage * chkResponseList LDAP_P(( LDAP *ld, int msgid, int all));
@@ -315,11 +315,12 @@ wait4msg(
             rc = (*result)->lm_msgtype;
         } else {
 
-                       for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) {
+                       for ( lc = ld->ld_conns; lc != NULL; lc = nextlc ) {
+                               nextlc = lc->lconn_next;
                                if ( ber_sockbuf_ctrl( lc->lconn_sb,
                                                LBER_SB_OPT_DATA_READY, NULL ) ) {
-                                           rc = try_read1msg( ld, msgid, all, lc->lconn_sb,
-                                               lc, result );
+                                       rc = try_read1msg( ld, msgid, all, lc->lconn_sb,
+                                               &lc, result );
                                    break;
                                }
                }
@@ -373,7 +374,8 @@ wait4msg(
                                                ldap_is_read_ready( ld,
                                                lc->lconn_sb )) {
                                                    rc = try_read1msg( ld, msgid, all,
-                                                       lc->lconn_sb, lc, result );
+                                                       lc->lconn_sb, &lc, result );
+                                                       if ( lc == NULL ) lc = nextlc;
                                            }
                                    }
                            }
@@ -409,7 +411,7 @@ try_read1msg(
        ber_int_t msgid,
        int all,
        Sockbuf *sb,
-       LDAPConn *lc,
+       LDAPConn **lcp,
        LDAPMessage **result )
 {
        BerElement      *ber;
@@ -419,6 +421,7 @@ try_read1msg(
        ber_len_t       len;
        int             foundit = 0;
        LDAPRequest     *lr, *tmplr;
+       LDAPConn        *lc;
        BerElement      tmpber;
        int             rc, refer_cnt, hadref, simple_request;
        ber_int_t       lderr;
@@ -432,7 +435,8 @@ try_read1msg(
        int     v3ref;
 
        assert( ld != NULL );
-       assert( lc != NULL );
+       assert( lcp != NULL );
+       assert( *lcp != NULL );
        
 #ifdef NEW_LOGGING
        LDAP_LOG ( OPERATION, ARGS, "read1msg: msgid %d, all %d\n", msgid, all, 0 );
@@ -440,6 +444,8 @@ try_read1msg(
        Debug( LDAP_DEBUG_TRACE, "read1msg: msgid %d, all %d\n", msgid, all, 0 );
 #endif
 
+       lc = *lcp;
+
 retry:
        if ( lc->lconn_ber == NULL ) {
                lc->lconn_ber = ldap_alloc_ber_with_options(ld);
@@ -815,6 +821,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" );
 
                        if ( lc != NULL ) {
                                ldap_free_connection( ld, lc, 0, 1 );
+                               *lcp = NULL;
                        }
                }
        }