]> git.sur5r.net Git - openldap/commitdiff
counter cleanup
authorPierangelo Masarati <ando@openldap.org>
Sun, 30 Jan 2005 22:07:32 +0000 (22:07 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 30 Jan 2005 22:07:32 +0000 (22:07 +0000)
servers/slapd/init.c
servers/slapd/result.c

index 1c34f10d3ed526714d827c571029479e5e95ffbb..e606e3da9ee898c5e2a641f9b66931ec6a890be6 100644 (file)
@@ -126,8 +126,8 @@ slap_init( int mode, const char *name )
                ldap_pvt_mp_init( slap_counters.sc_entries );
                ldap_pvt_mp_init( slap_counters.sc_refs );
 
-               ldap_pvt_mp_init( slap_counters.sc_ops_completed );
                ldap_pvt_mp_init( slap_counters.sc_ops_initiated );
+               ldap_pvt_mp_init( slap_counters.sc_ops_completed );
 
 #ifdef SLAPD_MONITOR
                for ( i = 0; i < SLAP_OP_LAST; i++ ) {
@@ -239,8 +239,8 @@ int slap_destroy(void)
                ldap_pvt_mp_clear( slap_counters.sc_pdu );
                ldap_pvt_mp_clear( slap_counters.sc_entries );
                ldap_pvt_mp_clear( slap_counters.sc_refs );
-               ldap_pvt_mp_clear( slap_counters.sc_ops_completed );
                ldap_pvt_mp_clear( slap_counters.sc_ops_initiated );
+               ldap_pvt_mp_clear( slap_counters.sc_ops_completed );
 
 #ifdef SLAPD_MONITOR
                for ( i = 0; i < SLAP_OP_LAST; i++ ) {
index 9c9d2ea587cc8660726e6a8f70e2c3fdbe8186ad..c2efc492fd8dc75a0f76a1f7872098e3451c280a 100644 (file)
@@ -453,7 +453,7 @@ send_ldap_response(
 
        ldap_pvt_thread_mutex_lock( &slap_counters.sc_sent_mutex );
        ldap_pvt_mp_add_ulong( slap_counters.sc_pdu, 1 );
-       ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, bytes );
+       ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, (unsigned long)bytes );
        ldap_pvt_thread_mutex_unlock( &slap_counters.sc_sent_mutex );
 
 cleanup:;
@@ -1180,7 +1180,7 @@ slap_send_search_entry( Operation *op, SlapReply *rs )
                rs->sr_nentries++;
 
                ldap_pvt_thread_mutex_lock( &slap_counters.sc_sent_mutex );
-               ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, bytes );
+               ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, (unsigned long)bytes );
                ldap_pvt_mp_add_ulong( slap_counters.sc_entries, 1 );
                ldap_pvt_mp_add_ulong( slap_counters.sc_pdu, 1 );
                ldap_pvt_thread_mutex_unlock( &slap_counters.sc_sent_mutex );
@@ -1369,7 +1369,7 @@ slap_send_search_reference( Operation *op, SlapReply *rs )
        ber_free_buf( ber );
 
        ldap_pvt_thread_mutex_lock( &slap_counters.sc_sent_mutex );
-       ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, bytes );
+       ldap_pvt_mp_add_ulong( slap_counters.sc_bytes, (unsigned long)bytes );
        ldap_pvt_mp_add_ulong( slap_counters.sc_refs, 1 );
        ldap_pvt_mp_add_ulong( slap_counters.sc_pdu, 1 );
        ldap_pvt_thread_mutex_unlock( &slap_counters.sc_sent_mutex );