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
ingo Voss
OpenLDAP
Commits
36cb0346
Commit
36cb0346
authored
Jun 17, 1999
by
Kurt Zeilenga
Browse files
Add test for resched state change in connection_get
parent
bfa86bcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/connection.c
View file @
36cb0346
...
...
@@ -176,9 +176,9 @@ static Connection* connection_get( int s )
continue
;
}
assert
(
connections
[
i
].
c_struct_state
==
SLAP_C_USED
);
assert
(
connections
[
i
].
c_conn_state
!=
SLAP_C_INVALID
);
assert
(
ber_pvt_sb_in_use
(
connections
[
i
].
c_sb
)
);
/* state can actually change from used -> unused by resched,
* so don't assert details here.
*/
if
(
ber_pvt_sb_get_desc
(
connections
[
i
].
c_sb
)
==
s
)
{
c
=
&
connections
[
i
];
...
...
@@ -193,6 +193,7 @@ static Connection* connection_get( int s )
if
(
c
->
c_struct_state
!=
SLAP_C_USED
)
{
/* connection must have been closed due to resched */
assert
(
c
->
c_conn_state
==
SLAP_C_INVALID
);
assert
(
!
ber_pvt_sb_in_use
(
c
->
c_sb
)
);
...
...
@@ -314,8 +315,7 @@ long connection_init(
assert
(
c
->
c_pending_ops
==
NULL
);
c
->
c_client_name
=
ch_strdup
(
name
==
NULL
?
""
:
name
);
if
(
addr
!=
NULL
)
c
->
c_client_addr
=
ch_strdup
(
addr
);
c
->
c_client_addr
=
ch_strdup
(
addr
);
c
->
c_n_ops_received
=
0
;
#ifdef LDAP_COUNTERS
...
...
@@ -357,9 +357,6 @@ connection_destroy( Connection *c )
assert
(
c
->
c_conn_state
!=
SLAP_C_INVALID
);
assert
(
c
->
c_ops
==
NULL
);
c
->
c_struct_state
=
SLAP_C_UNUSED
;
c
->
c_conn_state
=
SLAP_C_INVALID
;
#ifdef LDAP_COMPAT30
c
->
c_version
=
0
;
#endif
...
...
@@ -396,6 +393,9 @@ connection_destroy( Connection *c )
}
ber_pvt_sb_destroy
(
c
->
c_sb
);
c
->
c_conn_state
=
SLAP_C_INVALID
;
c
->
c_struct_state
=
SLAP_C_UNUSED
;
}
int
connection_state_closing
(
Connection
*
c
)
...
...
Write
Preview
Markdown
is supported
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