Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
bea9bfb3
Commit
bea9bfb3
authored
Feb 14, 2018
by
Ondřej Kuzník
Browse files
Move op counting to operation_init
parent
00116847
Changes
2
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/client.c
View file @
bea9bfb3
...
...
@@ -213,7 +213,6 @@ handle_one_request( LloadConnection *c )
switch
(
op
->
o_tag
)
{
case
LDAP_REQ_UNBIND
:
lload_stats
.
counters
[
LLOAD_STATS_OPS_OTHER
].
lc_ops_received
++
;
/* There is never a response for this operation */
op
->
o_res
=
LLOAD_OP_COMPLETED
;
operation_destroy_from_client
(
op
);
...
...
@@ -223,17 +222,14 @@ handle_one_request( LloadConnection *c )
CONNECTION_DESTROY
(
c
);
return
-
1
;
case
LDAP_REQ_BIND
:
lload_stats
.
counters
[
LLOAD_STATS_OPS_BIND
].
lc_ops_received
++
;
handler
=
request_bind
;
break
;
case
LDAP_REQ_ABANDON
:
lload_stats
.
counters
[
LLOAD_STATS_OPS_OTHER
].
lc_ops_received
++
;
/* We can't send a response to abandon requests even if a bind is
* currently in progress */
handler
=
request_abandon
;
break
;
case
LDAP_REQ_EXTENDED
:
lload_stats
.
counters
[
LLOAD_STATS_OPS_OTHER
].
lc_ops_received
++
;
handler
=
request_extended
;
break
;
default:
...
...
@@ -241,7 +237,6 @@ handle_one_request( LloadConnection *c )
return
operation_send_reject_locked
(
op
,
LDAP_PROTOCOL_ERROR
,
"bind in progress"
,
0
);
}
lload_stats
.
counters
[
LLOAD_STATS_OPS_OTHER
].
lc_ops_received
++
;
handler
=
request_process
;
break
;
}
...
...
servers/lloadd/operation.c
View file @
bea9bfb3
...
...
@@ -526,6 +526,15 @@ operation_init( LloadConnection *c, BerElement *ber )
ber_skip_element
(
ber
,
&
op
->
o_ctrls
);
}
switch
(
op
->
o_tag
)
{
case
LDAP_REQ_BIND
:
lload_stats
.
counters
[
LLOAD_STATS_OPS_BIND
].
lc_ops_received
++
;
break
;
default:
lload_stats
.
counters
[
LLOAD_STATS_OPS_OTHER
].
lc_ops_received
++
;
break
;
}
Debug
(
LDAP_DEBUG_STATS
,
"operation_init: "
"received a new operation, %s with msgid=%d for client "
"connid=%lu
\n
"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment