]> git.sur5r.net Git - openldap/commitdiff
ITS#2982 be sure to use nextlc when calling try_read1msg
authorHoward Chu <hyc@openldap.org>
Thu, 25 Mar 2004 09:54:23 +0000 (09:54 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 25 Mar 2004 09:54:23 +0000 (09:54 +0000)
libraries/libldap/result.c

index 0614f41be9b839e20db8db7b033c24ca1c16a851..42e758d053a10048bd3b93187d1b46c600fb6a48 100644 (file)
@@ -315,7 +315,8 @@ 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,