version 1.124.2.1, 2006/04/11 16:07:16
|
version 1.124.2.2, 2006/05/15 17:04:40
|
Line 1
|
Line 1
|
/* result.c - wait for an ldap result */ |
/* result.c - wait for an ldap result */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.125 2006/04/08 09:01:19 ando Exp $ */ |
/* $OpenLDAP: pkg/ldap/libraries/libldap/result.c,v 1.124.2.1 2006/04/11 16:07:16 kurt Exp $ */ |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
/* This work is part of OpenLDAP Software <http://www.openldap.org/>. |
* |
* |
* Copyright 1998-2006 The OpenLDAP Foundation. |
* Copyright 1998-2006 The OpenLDAP Foundation. |
Line 458 retry:
|
Line 458 retry:
|
nextresp3: |
nextresp3: |
#endif |
#endif |
tag = ber_get_next( lc->lconn_sb, &len, ber ); |
tag = ber_get_next( lc->lconn_sb, &len, ber ); |
if ( tag == LDAP_TAG_MESSAGE ) { |
switch ( tag ) { |
|
case LDAP_TAG_MESSAGE: |
/* |
/* |
* We read a complete message. |
* We read a complete message. |
* The connection should no longer need this ber. |
* The connection should no longer need this ber. |
*/ |
*/ |
lc->lconn_ber = NULL; |
lc->lconn_ber = NULL; |
} |
break; |
if ( tag != LDAP_TAG_MESSAGE ) { |
|
if ( tag == LBER_DEFAULT) { |
case LBER_DEFAULT: |
#ifdef LDAP_DEBUG |
#ifdef LDAP_DEBUG |
Debug( LDAP_DEBUG_CONNS, |
Debug( LDAP_DEBUG_CONNS, |
"ber_get_next failed.\n", 0, 0, 0 ); |
"ber_get_next failed.\n", 0, 0, 0 ); |
#endif |
#endif |
#ifdef EWOULDBLOCK |
#ifdef EWOULDBLOCK |
if (errno==EWOULDBLOCK) return LDAP_MSG_X_KEEP_LOOKING; |
if ( errno == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING; |
#endif |
#endif |
#ifdef EAGAIN |
#ifdef EAGAIN |
if (errno == EAGAIN) return LDAP_MSG_X_KEEP_LOOKING; |
if ( errno == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING; |
#endif |
#endif |
ld->ld_errno = LDAP_SERVER_DOWN; |
ld->ld_errno = LDAP_SERVER_DOWN; |
return -1; |
return -1; |
} |
|
|
default: |
ld->ld_errno = LDAP_LOCAL_ERROR; |
ld->ld_errno = LDAP_LOCAL_ERROR; |
return -1; |
return -1; |
} |
} |
Line 793 lr->lr_res_matched ? lr->lr_res_matched
|
Line 795 lr->lr_res_matched ? lr->lr_res_matched
|
ber_free( ber, 1 ); |
ber_free( ber, 1 ); |
ber = NULL; |
ber = NULL; |
if ( build_result_ber( ld, &ber, lr ) |
if ( build_result_ber( ld, &ber, lr ) |
== LBER_ERROR ) { |
== LBER_ERROR ) |
|
{ |
rc = -1; /* fatal error */ |
rc = -1; /* fatal error */ |
} |
} |
} |
} |