ber = c->c_currentber;
if ( ber == NULL && (ber = ber_alloc()) == NULL ) {
- Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n" );
+ Debug( LDAP_DEBUG_ANY, "client_read_cb: "
+ "ber_alloc failed\n" );
goto fail;
}
if ( err != EWOULDBLOCK && err != EAGAIN ) {
char ebuf[128];
- Debug( LDAP_DEBUG_ANY, "ber_get_next on fd %d failed errno=%d (%s)\n", c->c_fd,
- err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
+ Debug( LDAP_DEBUG_ANY, "client_read_cb: "
+ "ber_get_next on fd %d failed errno=%d (%s)\n",
+ c->c_fd, err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
c->c_currentber = NULL;
goto fail;
op = operation_init( c, ber );
if ( !op ) {
- Debug( LDAP_DEBUG_ANY, "operation_init failed\n" );
+ Debug( LDAP_DEBUG_ANY, "client_read_cb: "
+ "operation_init failed\n" );
goto fail;
}
event = event_new( base, s, EV_READ|EV_PERSIST, client_read_cb, c );
if ( !event ) {
- Debug( LDAP_DEBUG_ANY, "Read event could not be allocated\n" );
+ Debug( LDAP_DEBUG_ANY, "client_init: "
+ "Read event could not be allocated\n" );
goto fail;
}
event_add( event, NULL );
event = event_new( base, s, EV_WRITE, client_write_cb, c );
if ( !event ) {
- Debug( LDAP_DEBUG_ANY, "Write event could not be allocated\n" );
+ Debug( LDAP_DEBUG_ANY, "client_init: "
+ "Write event could not be allocated\n" );
goto fail;
}
/* We only register the write event when we have data pending */
ber = c->c_currentber;
if ( ber == NULL && (ber = ber_alloc()) == NULL ) {
- Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_read_cb: "
+ "ber_alloc failed\n" );
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
return;
}
if ( err != EWOULDBLOCK && err != EAGAIN ) {
char ebuf[128];
- Debug( LDAP_DEBUG_ANY, "ber_get_next on fd %d failed errno=%d (%s)\n", c->c_fd,
- err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
+ Debug( LDAP_DEBUG_ANY, "upstream_read_cb: "
+ "ber_get_next on fd %d failed errno=%d (%s)\n",
+ c->c_fd, err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
c->c_currentber = NULL;
goto fail;
evutil_socket_t s = c->c_fd;
Debug( LDAP_DEBUG_CONNS, "upstream_finish: "
- "connection %lu is ready for use\n", c->c_connid );
+ "connection %lu is ready for use\n",
+ c->c_connid );
base = slap_get_base( s );
event = event_new( base, s, EV_READ|EV_PERSIST, upstream_read_cb, c );
if ( !event ) {
- Debug( LDAP_DEBUG_ANY, "Read event could not be allocated\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_finish: "
+ "Read event could not be allocated\n" );
goto fail;
}
event_add( event, NULL );
ber = c->c_currentber;
if ( ber == NULL && (ber = ber_alloc()) == NULL ) {
- Debug( LDAP_DEBUG_ANY, "ber_alloc failed\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_bind_cb: "
+ "ber_alloc failed\n" );
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
return;
}
if ( err != EWOULDBLOCK && err != EAGAIN ) {
char ebuf[128];
- Debug( LDAP_DEBUG_ANY, "ber_get_next on fd %d failed errno=%d (%s)\n", c->c_fd,
- err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
+ Debug( LDAP_DEBUG_ANY, "upstream_bind_cb: "
+ "ber_get_next on fd %d failed errno=%d (%s)\n",
+ c->c_fd, err, sock_errstr( err, ebuf, sizeof(ebuf) ) );
c->c_currentber = NULL;
goto fail;
c->c_currentber = NULL;
if ( ber_scanf( ber, "it", &msgid, &tag ) == LBER_ERROR ) {
- Debug( LDAP_DEBUG_ANY, "upstream_bind_cb:"
- " protocol violation from server\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_bind_cb: "
+ "protocol violation from server\n" );
goto fail;
}
if ( msgid != ( c->c_next_msgid - 1 ) || tag != LDAP_RES_BIND ) {
- Debug( LDAP_DEBUG_ANY, "upstream_bind_cb:"
- " unexpected %s from server, msgid=%d\n",
+ Debug( LDAP_DEBUG_ANY, "upstream_bind_cb: "
+ "unexpected %s from server, msgid=%d\n",
slap_msgtype2str( tag ), msgid );
goto fail;
}
if ( ber_scanf( ber, "{eAA" /* "}" */, &result, &matcheddn, &message ) ==
LBER_ERROR ) {
- Debug( LDAP_DEBUG_ANY, "upstream_bind_cb:"
- " response does not conform with a bind response\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_bind_cb: "
+ "response does not conform with a bind response\n" );
goto fail;
}
event = event_new( base, s, EV_READ|EV_PERSIST, upstream_bind_cb, c );
if ( !event ) {
- Debug( LDAP_DEBUG_ANY, "Read event could not be allocated\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_bind: "
+ "Read event could not be allocated\n" );
upstream_destroy( c );
return NULL;
}
event = event_new( base, s, EV_WRITE, upstream_write_cb, c );
if ( !event ) {
- Debug( LDAP_DEBUG_ANY, "Write event could not be allocated\n" );
+ Debug( LDAP_DEBUG_ANY, "upstream_init: "
+ "Write event could not be allocated\n" );
goto fail;
}
/* We only register the write event when we have data pending */