Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
545198c7
Commit
545198c7
authored
Jun 23, 2017
by
Ondřej Kuzník
Committed by
Ondřej Kuzník
Nov 17, 2020
Browse files
Simplify abandon processing
parent
88390159
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/lloadd/operation.c
View file @
545198c7
...
...
@@ -543,21 +543,17 @@ request_abandon( Connection *c, Operation *op )
Operation
*
request
,
needle
=
{
.
o_client_connid
=
c
->
c_connid
};
int
rc
=
LDAP_SUCCESS
;
/* parse two's complement integer */
if
(
!
BER_BVISEMPTY
(
&
op
->
o_request
)
)
{
unsigned
char
*
buf
=
(
unsigned
char
*
)
op
->
o_request
.
bv_val
;
ber_len_t
i
;
ber_int_t
netnum
=
buf
[
0
]
&
0xff
;
/* sign extend */
netnum
=
(
netnum
^
0x80
)
-
0x80
;
/* shift in the bytes */
for
(
i
=
1
;
i
<
op
->
o_request
.
bv_len
;
i
++
)
{
netnum
=
(
netnum
<<
8
)
|
buf
[
i
];
}
if
(
ber_decode_int
(
&
op
->
o_request
,
&
needle
.
o_client_msgid
)
)
{
Debug
(
LDAP_DEBUG_STATS
,
"request_abandon: "
"connid=%lu msgid=%d invalid integer sent in abandon request
\n
"
,
c
->
c_connid
,
op
->
o_client_msgid
);
needle
.
o_client_msgid
=
netnum
;
CONNECTION_UNLOCK_INCREF
(
c
);
operation_send_reject
(
op
,
LDAP_PROTOCOL_ERROR
,
"invalid PDU received"
,
0
);
CONNECTION_LOCK_DECREF
(
c
);
CLIENT_DESTROY
(
c
);
return
-
1
;
}
request
=
tavl_find
(
c
->
c_ops
,
&
needle
,
operation_client_cmp
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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