Commit 603eec57 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

remove #ifdef EAGAIN, EWOULDBLOCK (ITS#6603)

parent 5f2af361
...@@ -549,11 +549,7 @@ ber_get_next( ...@@ -549,11 +549,7 @@ ber_get_next(
} }
/* Did we run out of bytes? */ /* Did we run out of bytes? */
if ((char *)p == ber->ber_rwptr) { if ((char *)p == ber->ber_rwptr) {
#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK); sock_errset(EWOULDBLOCK);
#elif defined( EAGAIN )
sock_errset(EAGAIN);
#endif
return LBER_DEFAULT; return LBER_DEFAULT;
} }
} }
...@@ -562,11 +558,7 @@ ber_get_next( ...@@ -562,11 +558,7 @@ ber_get_next(
} }
if ( ber->ber_ptr == ber->ber_rwptr ) { if ( ber->ber_ptr == ber->ber_rwptr ) {
#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK); sock_errset(EWOULDBLOCK);
#elif defined( EAGAIN )
sock_errset(EAGAIN);
#endif
return LBER_DEFAULT; return LBER_DEFAULT;
} }
...@@ -581,11 +573,7 @@ ber_get_next( ...@@ -581,11 +573,7 @@ ber_get_next(
} }
/* Not enough bytes? */ /* Not enough bytes? */
if (ber->ber_rwptr - (char *)p < llen) { if (ber->ber_rwptr - (char *)p < llen) {
#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK); sock_errset(EWOULDBLOCK);
#elif defined( EAGAIN )
sock_errset(EAGAIN);
#endif
return LBER_DEFAULT; return LBER_DEFAULT;
} }
for (i=0; i<llen; i++) { for (i=0; i<llen; i++) {
...@@ -672,11 +660,7 @@ ber_get_next( ...@@ -672,11 +660,7 @@ ber_get_next(
ber->ber_rwptr+=res; ber->ber_rwptr+=res;
if (res<to_go) { if (res<to_go) {
#if defined( EWOULDBLOCK )
sock_errset(EWOULDBLOCK); sock_errset(EWOULDBLOCK);
#elif defined( EAGAIN )
sock_errset(EAGAIN);
#endif
return LBER_DEFAULT; return LBER_DEFAULT;
} }
done: done:
......
...@@ -498,12 +498,8 @@ nextresp3: ...@@ -498,12 +498,8 @@ nextresp3:
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
if ( err == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING; if ( err == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING;
#endif
#ifdef EAGAIN
if ( err == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING; if ( err == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING;
#endif
ld->ld_errno = LDAP_SERVER_DOWN; ld->ld_errno = LDAP_SERVER_DOWN;
--lc->lconn_refcnt; --lc->lconn_refcnt;
lc->lconn_status = 0; lc->lconn_status = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment