]> git.sur5r.net Git - openldap/commitdiff
Clean up debug messages.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 19 Aug 1999 00:40:18 +0000 (00:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 19 Aug 1999 00:40:18 +0000 (00:40 +0000)
servers/slapd/abandon.c
servers/slapd/back-ldbm/dbcache.c
servers/slapd/bind.c
servers/slapd/connection.c
servers/slapd/daemon.c
servers/slapd/result.c
servers/slapd/tools/edb2ldif.c
servers/slapd/tools/ldbmtest.c
servers/slapd/tools/slapadd.c

index ec95e10a4eeaecf128af5dce19ac2070421b5430..0d312091483d6a302152836eff29a66337a5416c 100644 (file)
@@ -54,7 +54,7 @@ do_abandon(
                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,
index 3a0287122e1c68f1ea5e02f92e0e7d10695b8d53..ff795cd062b7637a1a2b2afc3b8194d2d6ea00b5 100644 (file)
@@ -99,7 +99,7 @@ ldbm_cache_open(
            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 );
index 262dd3c4b8cb773d354a02a131d9b8da5d090d66..196fa67cf32957ceb0bb4e72fa00f313586d88fb 100644 (file)
@@ -155,15 +155,16 @@ do_bind(
                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;
@@ -171,8 +172,8 @@ do_bind(
 
        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;
@@ -182,7 +183,7 @@ do_bind(
                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;
@@ -190,7 +191,7 @@ do_bind(
 
                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 );
index 91633073fb8a4cab7f806b5bf80633a1943491ee..a1ed6defb791c7f1c60f4c7d8338b39a60381263 100644 (file)
@@ -82,7 +82,7 @@ int connections_init(void)
 
        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;
        }
@@ -246,8 +246,8 @@ static Connection* connection_get( ber_socket_t s )
                        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;
@@ -338,7 +338,7 @@ long connection_init(
 
         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;
@@ -508,7 +508,7 @@ connection_destroy( Connection *c )
                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 );
        }
 
@@ -566,7 +566,7 @@ void connection_closing( Connection *c )
        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 */
@@ -597,13 +597,13 @@ static void connection_close( Connection *c )
 
        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 );
@@ -843,7 +843,7 @@ int connection_read(ber_socket_t s)
                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;
@@ -914,7 +914,7 @@ connection_input(
                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,
@@ -989,7 +989,7 @@ connection_resched( Connection *conn )
 
        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 );
index 43ec5b288e319bdedc0d60bdb0947b8f78d3ba12..7341b836809dde0f0d61f5830035af3b582eeb7c 100644 (file)
@@ -277,12 +277,12 @@ open_listener(
 #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
@@ -307,7 +307,7 @@ open_listener(
        {
                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" );
@@ -321,7 +321,7 @@ open_listener(
        {
                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" );
@@ -335,7 +335,7 @@ open_listener(
        {
                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" );
@@ -344,7 +344,7 @@ open_listener(
 
        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" );
@@ -442,7 +442,7 @@ int slapd_daemon_init(char *urls, int port, int tls_port )
        }
        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 );
@@ -476,7 +476,7 @@ slapd_daemon_task(
                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" );
@@ -649,7 +649,7 @@ slapd_daemon_task(
                        {
                                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");
index cf572e81cd331547d931de2909f5c849feb2fac7..6f3434276d82b02533cf00e3e3ab72354451f26b 100644 (file)
@@ -184,7 +184,7 @@ static long send_ldap_ber(
                 * 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 );
 
index 345a5e89383ec1f01474b1bf2977d6314f480450..8fe0ac64c96654d3550ac48c4d0fbe15ea057b0e 100644 (file)
@@ -863,7 +863,7 @@ print_err( char *msg )
 #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 ] );
     }
index b0a6766b2cff955360923b34a623c6295cb35008..ad666a9ddb8b6299c9dca208e1a0949d4cf7aa1d 100644 (file)
@@ -196,7 +196,7 @@ main( int argc, char **argv )
                                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 ) );
                                }
                        }
@@ -219,7 +219,7 @@ main( int argc, char **argv )
                                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 );
@@ -237,7 +237,7 @@ main( int argc, char **argv )
                                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 ) );
                                }
                        }
@@ -259,7 +259,7 @@ main( int argc, char **argv )
                                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 ) );
                                }
                        }
@@ -647,7 +647,7 @@ print_entry(
                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;
        }
index 8816cbeaa8815fb3efb14b34ce6924c1239a5cd1..d815e444cb49209f742ca4967ec60d0254f9e7f6 100644 (file)
@@ -99,7 +99,7 @@ main( int argc, char **argv )
                        break;
 
                } else if ( verbose ) {
-                       fprintf( stderr, "added: \"%s\" (%08ld)\n",
+                       fprintf( stderr, "added: \"%s\" (%08lx)\n",
                                e->e_dn, (long) id );
                }