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
db5966f6
Commit
db5966f6
authored
Feb 07, 2018
by
Ondřej Kuzník
Browse files
More meaningful connection type reporting
parent
22818e85
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/monitor.c
View file @
db5966f6
...
...
@@ -177,8 +177,8 @@ static struct {
{
"( olmBalancerAttributes:10 "
"NAME ( 'olmConnectionType' ) "
"DESC 'Connection type' "
"EQUALITY
integer
Match "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.
27
"
"EQUALITY
caseIgnore
Match "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.
15
"
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
&
ad_olmConnectionType
},
...
...
@@ -553,7 +553,29 @@ lload_monitor_up_conn_entry( LloadConnection *c, void *argv )
e
=
mbe
->
entry_stub
(
&
arg
->
ms
->
mss_dn
,
&
arg
->
ms
->
mss_ndn
,
&
bv_rdn
,
oc_olmBalancerConnection
,
NULL
,
NULL
);
UI2BV
(
&
bv_type
,
(
long
long
unsigned
int
)
c
->
c_type
);
switch
(
c
->
c_type
)
{
case
LLOAD_C_OPEN
:
{
struct
berval
bv
=
BER_BVC
(
"regular"
);
bv_type
=
bv
;
}
break
;
case
LLOAD_C_PREPARING
:
{
struct
berval
bv
=
BER_BVC
(
"preparing"
);
bv_type
=
bv
;
}
break
;
case
LLOAD_C_BIND
:
{
struct
berval
bv
=
BER_BVC
(
"bind"
);
bv_type
=
bv
;
}
break
;
case
LLOAD_C_PRIVILEGED
:
{
struct
berval
bv
=
BER_BVC
(
"privileged"
);
bv_type
=
bv
;
}
break
;
default:
{
struct
berval
bv
=
BER_BVC
(
"unknown"
);
bv_type
=
bv
;
}
break
;
}
UI2BV
(
&
bv_pending
,
(
long
long
unsigned
int
)
c
->
c_n_ops_executing
);
UI2BV
(
&
bv_received
,
c
->
c_counters
.
lc_ops_received
);
UI2BV
(
&
bv_completed
,
c
->
c_counters
.
lc_ops_completed
);
...
...
@@ -565,7 +587,6 @@ lload_monitor_up_conn_entry( LloadConnection *c, void *argv )
attr_merge_normalize_one
(
e
,
ad_olmCompletedOps
,
&
bv_completed
,
NULL
);
attr_merge_normalize_one
(
e
,
ad_olmFailedOps
,
&
bv_failed
,
NULL
);
ch_free
(
bv_type
.
bv_val
);
ch_free
(
bv_pending
.
bv_val
);
ch_free
(
bv_received
.
bv_val
);
ch_free
(
bv_completed
.
bv_val
);
...
...
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