return rc;
}
- Debug( LDAP_DEBUG_ARGS, "do_abandon: id %d\n", id, 0 ,0 );
+ Debug( LDAP_DEBUG_ARGS, "do_abandon: id=%ld\n", (long) id, 0 ,0 );
if( id <= 0 ) {
Debug( LDAP_DEBUG_ANY,
li->li_dbcachesize )) == NULL ) {
int err = errno;
Debug( LDAP_DEBUG_TRACE,
- "<= ldbm_cache_open NULL \"%s\" errno %d reason \"%s\")\n",
+ "<= ldbm_cache_open NULL \"%s\" errno=%d reason=\"%s\")\n",
buf, err, err > -1 && err < sys_nerr ?
sys_errlist[err] : "unknown" );
ldap_pvt_thread_mutex_unlock( &li->li_dbcache_mutex );
Debug( LDAP_DEBUG_TRACE, "do_sasl_bind: dn (%s) mech %s\n",
dn, mech, NULL );
} else {
- Debug( LDAP_DEBUG_TRACE, "do_bind: version %d dn (%s) method %d\n",
- version, dn, method );
+ Debug( LDAP_DEBUG_TRACE, "do_bind: version=%ld dn=\"%s\" method=%ld\n",
+ (unsigned long) version, dn, (unsigned long) method );
}
Statslog( LDAP_DEBUG_STATS, "conn=%ld op=%d BIND dn=\"%s\" method=%ld\n",
op->o_connid, op->o_opid, ndn, (unsigned long) method, 0 );
if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
- Debug( LDAP_DEBUG_ANY, "unknown version %d\n", version, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "do_bind: unknown version=%ld\n",
+ (unsigned long) version, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_PROTOCOL_ERROR,
NULL, "version not supported", NULL, NULL );
goto cleanup;
if ( method == LDAP_AUTH_SASL ) {
if ( version < LDAP_VERSION3 ) {
- Debug( LDAP_DEBUG_ANY, "do_bind: sasl with LDAPv%d\n",
- version, 0, 0 );
+ Debug( LDAP_DEBUG_ANY, "do_bind: sasl with LDAPv%ld\n",
+ (unsigned long) version, 0, 0 );
send_ldap_disconnect( conn, op,
LDAP_PROTOCOL_ERROR, "sasl bind requires LDAPv3" );
rc = -1;
if( mech == NULL || *mech == '\0' ) {
Debug( LDAP_DEBUG_ANY,
"do_bind: no sasl mechanism provided\n",
- version, 0, 0 );
+ 0, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_AUTH_METHOD_NOT_SUPPORTED,
NULL, "no sasl mechanism provided", NULL, NULL );
goto cleanup;
if( !charray_inlist( supportedSASLMechanisms, mech ) ) {
Debug( LDAP_DEBUG_ANY,
- "do_bind: sasl mechanism \"%s\" not supported.\n",
+ "do_bind: sasl mechanism=\"%s\" not supported.\n",
mech, 0, 0 );
send_ldap_result( conn, op, rc = LDAP_AUTH_METHOD_NOT_SUPPORTED,
NULL, "sasl mechanism not supported", NULL, NULL );
if( connections == NULL ) {
Debug( LDAP_DEBUG_ANY,
- "connections_init: allocation (%d*%ld) of connection array failed.\n",
+ "connections_init: allocation (%d*%ld) of connection array failed\n",
dtblsize, (long) sizeof(Connection), 0 );
return -1;
}
assert( !ber_pvt_sb_in_use( c->c_sb ) );
Debug( LDAP_DEBUG_TRACE,
- "connection_get(%d): connection not used.\n",
- s, c->c_connid, 0 );
+ "connection_get(%d): connection not used\n",
+ s, 0, 0 );
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
return NULL;
if( c == NULL ) {
Debug( LDAP_DEBUG_ANY,
- "connection_init(%d): connection table full (%d/%d).\n",
+ "connection_init(%d): connection table full (%d/%d)\n",
s, i, dtblsize);
ldap_pvt_thread_mutex_unlock( &connections_mutex );
return -1;
ber_pvt_sb_close( c->c_sb );
Statslog( LDAP_DEBUG_STATS,
- "conn=%ld fd=%d closed.\n",
+ "conn=%ld fd=%d closed\n",
c->c_connid, sd, 0, 0, 0 );
}
if( c->c_conn_state != SLAP_C_CLOSING ) {
Debug( LDAP_DEBUG_TRACE,
- "connection_closing: readying conn=%ld sd=%d for close.\n",
+ "connection_closing: readying conn=%ld sd=%d for close\n",
c->c_connid, ber_pvt_sb_get_desc( c->c_sb ), 0 );
/* update state to closing */
if( c->c_ops != NULL ) {
Debug( LDAP_DEBUG_TRACE,
- "connection_close: deferring conn=%ld sd=%d.\n",
+ "connection_close: deferring conn=%ld sd=%d\n",
c->c_connid, ber_pvt_sb_get_desc( c->c_sb ), 0 );
return;
}
- Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%ld sd=%d.\n",
+ Debug( LDAP_DEBUG_TRACE, "connection_close: conn=%ld sd=%d\n",
c->c_connid, ber_pvt_sb_get_desc( c->c_sb ), 0 );
connection_destroy( c );
rc = ldap_pvt_tls_accept( c->c_sb, NULL );
if ( rc < 0 ) {
Debug( LDAP_DEBUG_TRACE,
- "connection_read(%d): TLS accept error error=%d id=%ld, closing.\n",
+ "connection_read(%d): TLS accept error error=%d id=%ld, closing\n",
s, rc, c->c_connid );
c->c_needs_tls_accept = 0;
int err = errno;
Debug( LDAP_DEBUG_TRACE,
- "ber_get_next on fd %d failed errno %d (%s)\n",
+ "ber_get_next on fd %d failed errno=%d (%s)\n",
ber_pvt_sb_get_desc( conn->c_sb ), err,
err > -1 && err < sys_nerr ? sys_errlist[err] : "unknown" );
Debug( LDAP_DEBUG_TRACE,
if( conn->c_conn_state == SLAP_C_CLOSING ) {
Debug( LDAP_DEBUG_TRACE,
- "connection_resched: attempting closing conn=%ld sd=%d.\n",
+ "connection_resched: attempting closing conn=%ld sd=%d\n",
conn->c_connid, ber_pvt_sb_get_desc( conn->c_sb ), 0 );
connection_close( conn );
#ifndef HAVE_WINSOCK
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "daemon: socket() failed errno %d (%s)\n", err,
+ "daemon: socket() failed errno=%d (%s)\n", err,
err > -1 && err < sys_nerr ? sys_errlist[err] :
"unknown", 0 );
#else
Debug( LDAP_DEBUG_ANY,
- "daemon: socket() failed errno %d (%s)\n",
+ "daemon: socket() failed errno=%d (%s)\n",
WSAGetLastError(),
WSAGetLastErrorString(), 0 );
#endif
{
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "slapd(%ld): setsockopt(SO_REUSEADDR) failed errno %d (%s)\n",
+ "slapd(%ld): setsockopt(SO_REUSEADDR) failed errno=%d (%s)\n",
(long) l.sl_sd, err,
err > -1 && err < sys_nerr
? sys_errlist[err] : "unknown" );
{
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "slapd(%ld): setsockopt(SO_KEEPALIVE) failed errno %d (%s)\n",
+ "slapd(%ld): setsockopt(SO_KEEPALIVE) failed errno=%d (%s)\n",
(long) l.sl_sd, err,
err > -1 && err < sys_nerr
? sys_errlist[err] : "unknown" );
{
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "slapd(%ld): setsockopt(TCP_NODELAY) failed errno %d (%s)\n",
+ "slapd(%ld): setsockopt(TCP_NODELAY) failed errno=%d (%s)\n",
(long) l.sl_sd, err,
err > -1 && err < sys_nerr
? sys_errlist[err] : "unknown" );
if ( bind( l.sl_sd, (struct sockaddr *) &l.sl_addr, sizeof(l.sl_addr) ) == -1 ) {
int err = errno;
- Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno %d (%s)\n",
+ Debug( LDAP_DEBUG_ANY, "daemon: bind(%ld) failed errno=%d (%s)\n",
(long) l.sl_sd, err,
err > -1 && err < sys_nerr
? sys_errlist[err] : "unknown" );
}
slap_listeners[i] = NULL;
- Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners opened.\n",
+ Debug( LDAP_DEBUG_TRACE, "daemon_init: %d listeners opened\n",
i, 0, 0 );
charray_free( u );
if ( listen( slap_listeners[l]->sl_sd, 5 ) == -1 ) {
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "daemon: listen(%s, 5) failed errno %d (%s)\n",
+ "daemon: listen(%s, 5) failed errno=%d (%s)\n",
(long) slap_listeners[l]->sl_url, err,
err > -1 && err < sys_nerr
? sys_errlist[err] : "unknown" );
{
int err = errno;
Debug( LDAP_DEBUG_ANY,
- "daemon: accept(%ld) failed errno %d (%s)\n", err,
+ "daemon: accept(%ld) failed errno=%d (%s)\n", err,
(long) slap_listeners[l]->sl_sd,
err >= 0 && err < sys_nerr ?
sys_errlist[err] : "unknown");
* it's a hard error and return.
*/
- Debug( LDAP_DEBUG_CONNS, "ber_flush failed errno %d msg (%s)\n",
+ Debug( LDAP_DEBUG_CONNS, "ber_flush failed errno=%d reason=\"%s\"\n",
err, err > -1 && err < sys_nerr ? sys_errlist[err]
: "unknown", 0 );
#endif
if ( errno > sys_nerr ) {
- fprintf( stderr, "%s: %s: error %d\n", progname, msg, errno );
+ fprintf( stderr, "%s: %s: errno=%d\n", progname, msg, errno );
} else {
fprintf( stderr, "%s: %s: %s\n", progname, msg, sys_errlist[ errno ] );
}
if ( ldbm_errno( dbc->dbc_db ) == 0 ) {
perror( "ldbm_delete" );
} else {
- fprintf( stderr, "db_errno %d",
+ fprintf( stderr, "db_errno=%d",
ldbm_errno( dbc->dbc_db ) );
}
}
if ( ldbm_errno( dbc->dbc_db ) == 0 ) {
perror( "ldbm_fetch" );
} else {
- fprintf( stderr, "db_errno %d\n",
+ fprintf( stderr, "db_errno=%d\n",
ldbm_errno( dbc->dbc_db ) );
}
free_and_close( dbc, key, data );
if ( ldbm_errno( dbc->dbc_db ) == 0 ) {
perror( "ldbm_store" );
} else {
- fprintf( stderr, "db_errno %d\n",
+ fprintf( stderr, "db_errno=%d\n",
ldbm_errno( dbc->dbc_db ) );
}
}
if ( ldbm_errno( dbc->dbc_db ) == 0 ) {
perror( "ldbm_store" );
} else {
- fprintf( stderr, "db_errno %d\n",
+ fprintf( stderr, "db_errno=%d\n",
ldbm_errno( dbc->dbc_db ) );
}
}
if ( ldbm_errno( dbp ) == 0 )
perror( msg );
else
- fprintf( stderr, "%s: db_errno %d\n", msg,
+ fprintf( stderr, "%s: db_errno=%d\n", msg,
ldbm_errno( dbp ) );
return;
}
break;
} else if ( verbose ) {
- fprintf( stderr, "added: \"%s\" (%08ld)\n",
+ fprintf( stderr, "added: \"%s\" (%08lx)\n",
e->e_dn, (long) id );
}