Commit 059ee8c8 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

(re)introduce o_connid such that STATS doesn't need c_mutex (which it

didn't bother to acquire)...
parent 66110243
......@@ -117,7 +117,7 @@ do_add( Connection *conn, Operation *op )
}
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d ADD dn=\"%s\"\n",
conn->c_connid, op->o_opid, e->e_ndn, 0, 0 );
op->o_connid, op->o_opid, e->e_ndn, 0, 0 );
/*
* We could be serving multiple database backends. Select the
......
......@@ -154,7 +154,7 @@ do_bind(
ndn = dn_normalize_case( ch_strdup( cdn ) );
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d BIND dn=\"%s\" method=%d\n",
conn->c_connid, op->o_opid, ndn, method, 0 );
op->o_connid, op->o_opid, ndn, method, 0 );
if ( version < LDAP_VERSION_MIN || version > LDAP_VERSION_MAX ) {
Debug( LDAP_DEBUG_ANY, "unknown version %d\n", version, 0, 0 );
......
......@@ -74,7 +74,7 @@ do_compare(
ndn = dn_normalize_case( ndn );
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d CMP dn=\"%s\" attr=\"%s\"\n",
conn->c_connid, op->o_opid, ndn, ava.ava_type, 0 );
op->o_connid, op->o_opid, ndn, ava.ava_type, 0 );
/*
* We could be serving multiple database backends. Select the
......
......@@ -421,6 +421,7 @@ connection_destroy( Connection *c )
backend_connection_destroy(c);
c->c_protocol = 0;
c->c_connid = -1;
c->c_activitytime = c->c_starttime = 0;
......@@ -990,6 +991,7 @@ static int connection_op_activate( Connection *conn, Operation *op )
arg->co_op->o_ndn = dn_normalize_case( ch_strdup( arg->co_op->o_dn ) );
arg->co_op->o_protocol = conn->c_protocol;
arg->co_op->o_connid = conn->c_connid;
arg->co_op->o_authtype = conn->c_authtype;
arg->co_op->o_authmech = conn->c_authmech != NULL
......
......@@ -151,7 +151,7 @@ do_modify(
}
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\"\n",
conn->c_connid, op->o_opid, ndn, 0, 0 );
op->o_connid, op->o_opid, ndn, 0, 0 );
/*
* We could be serving multiple database backends. Select the
......
......@@ -170,7 +170,7 @@ do_modrdn(
dn_normalize_case( ndn );
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d MODRDN dn=\"%s\"\n",
conn->c_connid, op->o_opid, ndn, 0, 0 );
op->o_connid, op->o_opid, ndn, 0, 0 );
/*
* We could be serving multiple database backends. Select the
......
......@@ -342,7 +342,7 @@ send_ldap_disconnect(
Statslog( LDAP_DEBUG_STATS,
"conn=%ld op=%ld DISCONNECT err=%ld tag=%lu text=%s\n",
(long) conn->c_connid, (long) op->o_opid,
(long) op->o_connid, (long) op->o_opid,
(long) tag, (long) err, text );
}
......@@ -363,7 +363,9 @@ send_ldap_result(
assert( !LDAP_API_ERROR( err ) );
Debug( LDAP_DEBUG_TRACE, "send_ldap_result %d:%s:%s\n",
Debug( LDAP_DEBUG_TRACE, "send_ldap_result: conn=%ld op=%ld p=%d\n",
(long) op->o_connid, (long) op->o_opid, op->o_protocol );
Debug( LDAP_DEBUG_ARGS, "send_ldap_result: %d:%s:%s\n",
err, matched ? matched : "", text ? text : "" );
assert( err != LDAP_PARTIAL_RESULTS );
......@@ -402,7 +404,7 @@ send_ldap_result(
Statslog( LDAP_DEBUG_STATS,
"conn=%ld op=%ld RESULT err=%ld tag=%lu text=%s\n",
(long) conn->c_connid, (long) op->o_opid,
(long) op->o_connid, (long) op->o_opid,
(long) err, (long) tag, text );
if( tmp != NULL ) {
......@@ -471,7 +473,7 @@ send_search_result(
Statslog( LDAP_DEBUG_STATS,
"conn=%ld op=%ld SEARCH RESULT err=%ld tag=%lu text=%s\n",
(long) conn->c_connid, (long) op->o_opid,
(long) op->o_connid, (long) op->o_opid,
(long) err, (long) tag, text );
}
......
......@@ -153,7 +153,7 @@ do_search(
Statslog( LDAP_DEBUG_STATS,
"conn=%d op=%d SRCH base=\"%s\" scope=%d filter=\"%s\"\n",
conn->c_connid, op->o_opid, base, scope, fstr );
op->o_connid, op->o_opid, base, scope, fstr );
if ( scope == LDAP_SCOPE_BASE ) {
#if defined( SLAPD_MONITOR_DN )
......
......@@ -549,7 +549,7 @@ typedef struct slap_op {
LDAPControl **o_ctrls; /* controls */
/* long o_connid; *//* id of conn initiating this op */
unsigned long o_connid; /* id of conn initiating this op */
#ifdef LDAP_CONNECTIONLESS
int o_cldap; /* != 0 if this came in via CLDAP */
......
......@@ -36,7 +36,7 @@ do_unbind(
* UnBindRequest ::= NULL
*/
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND\n", conn->c_connid,
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d UNBIND\n", op->o_connid,
op->o_opid, 0, 0, 0 );
/* pass the unbind to all backends */
......
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