}
/* Did we run out of bytes? */
if ((char *)p == ber->ber_rwptr) {
-#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK);
-#elif defined( EAGAIN )
- sock_errset(EAGAIN);
-#endif
return LBER_DEFAULT;
}
}
}
if ( ber->ber_ptr == ber->ber_rwptr ) {
-#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK);
-#elif defined( EAGAIN )
- sock_errset(EAGAIN);
-#endif
return LBER_DEFAULT;
}
}
/* Not enough bytes? */
if (ber->ber_rwptr - (char *)p < llen) {
-#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK);
-#elif defined( EAGAIN )
- sock_errset(EAGAIN);
-#endif
return LBER_DEFAULT;
}
for (i=0; i<llen; i++) {
ber->ber_rwptr+=res;
if (res<to_go) {
-#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK);
-#elif defined( EAGAIN )
- sock_errset(EAGAIN);
-#endif
return LBER_DEFAULT;
}
done:
Debug( LDAP_DEBUG_CONNS,
"ber_get_next failed.\n", 0, 0, 0 );
#endif
-#ifdef EWOULDBLOCK
if ( err == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING;
-#endif
-#ifdef EAGAIN
if ( err == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING;
-#endif
ld->ld_errno = LDAP_SERVER_DOWN;
--lc->lconn_refcnt;
lc->lconn_status = 0;