From: Kurt Zeilenga Date: Sat, 9 Oct 2004 03:16:29 +0000 (+0000) Subject: ITS#3359: fix crash on recursive rebind following referral X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~439 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1b5c5da96d2a0a3456aeb1a8d834135168a98e7e;p=openldap ITS#3359: fix crash on recursive rebind following referral --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index dd41a27a9c..44c0e98ef4 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -243,11 +243,13 @@ wait4msg( #ifdef LDAP_DEBUG if ( timeout == NULL ) { - Debug( LDAP_DEBUG_TRACE, "wait4msg (infinite timeout), msgid %d\n", - msgid, 0, 0 ); + Debug( LDAP_DEBUG_TRACE, + "wait4msg (infinite timeout), msgid %d\n", + msgid, 0, 0 ); } else { - Debug( LDAP_DEBUG_TRACE, "wait4msg (timeout %ld sec, %ld usec), msgid %d\n", - (long) timeout->tv_sec, (long) timeout->tv_usec, msgid ); + Debug( LDAP_DEBUG_TRACE, + "wait4msg (timeout %ld sec, %ld usec), msgid %d\n", + (long) timeout->tv_sec, (long) timeout->tv_usec, msgid ); } #endif /* LDAP_DEBUG */ @@ -302,7 +304,7 @@ wait4msg( { ld->ld_errno = (rc == -1 ? LDAP_SERVER_DOWN : LDAP_TIMEOUT); - return( rc ); + return -1; } if ( rc == -1 ) { @@ -351,7 +353,7 @@ wait4msg( } } - return( rc ); + return rc; }