int rc = ldap_result( conn, msgid, LDAP_MSG_ONE, &tv, &res );
- switch( rc )
- {
- case -1:
- throw LDAPException( "Error waiting for LDAP result: " + ldapGetError( conn, rc ) );
- case 0:
- throw LDAPTimeout();
- }
+ if ( rc == -1 || rc == 0 )
+ return rc;
if( result == NULL )
{
int PowerLDAP::waitResult( int msgid, int timeout, LDAPMessage** result )
{
- try {
- return ldapWaitResult( d_ld, msgid, timeout, result );
- }
- catch ( LDAPException &e ) {
- ensureConnect();
- throw; // Not sure why this was done, but the original behavior.
- }
+ return ldapWaitResult( d_ld, msgid, timeout, result );
}