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
orbea -
OpenLDAP
Commits
a2d93d69
Commit
a2d93d69
authored
Jun 22, 2018
by
Ondřej Kuzník
Browse files
ITS#8772 Remove reliance on the local rmutex implementation
parent
7fa5eb42
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/overlays/accesslog.c
View file @
a2d93d69
...
...
@@ -76,7 +76,7 @@ typedef struct log_info {
struct
berval
li_uuid
;
int
li_success
;
log_base
*
li_bases
;
ldap_pvt_thread_
r
mutex_t
li_op_rmutex
;
ldap_pvt_thread_mutex_t
li_op_rmutex
;
ldap_pvt_thread_mutex_t
li_log_mutex
;
}
log_info
;
...
...
@@ -1512,7 +1512,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
"accesslog_response: unlocking rmutex for tid %x
\n
"
,
op
->
o_tid
,
0
,
0
);
#endif
ldap_pvt_thread_
r
mutex_unlock
(
&
li
->
li_op_rmutex
,
op
->
o_tid
);
ldap_pvt_thread_mutex_unlock
(
&
li
->
li_op_rmutex
);
}
/* ignore these internal reads */
...
...
@@ -1985,7 +1985,7 @@ accesslog_op_mod( Operation *op, SlapReply *rs )
"accesslog_op_mod: locking rmutex for tid %x
\n
"
,
op
->
o_tid
,
0
,
0
);
#endif
ldap_pvt_thread_
r
mutex_lock
(
&
li
->
li_op_rmutex
,
op
->
o_tid
);
ldap_pvt_thread_mutex_lock
(
&
li
->
li_op_rmutex
);
#ifdef RMUTEX_DEBUG
Debug
(
LDAP_DEBUG_STATS
,
"accesslog_op_mod: locked rmutex for tid %x
\n
"
,
...
...
@@ -2169,7 +2169,7 @@ accesslog_db_init(
log_info
*
li
=
ch_calloc
(
1
,
sizeof
(
log_info
));
on
->
on_bi
.
bi_private
=
li
;
ldap_pvt_thread_
r
mutex_init
(
&
li
->
li_op_rmutex
);
ldap_pvt_thread_mutex_
recursive_
init
(
&
li
->
li_op_rmutex
);
ldap_pvt_thread_mutex_init
(
&
li
->
li_log_mutex
);
return
0
;
}
...
...
@@ -2191,7 +2191,7 @@ accesslog_db_destroy(
ch_free
(
la
);
}
ldap_pvt_thread_mutex_destroy
(
&
li
->
li_log_mutex
);
ldap_pvt_thread_
r
mutex_destroy
(
&
li
->
li_op_rmutex
);
ldap_pvt_thread_mutex_destroy
(
&
li
->
li_op_rmutex
);
free
(
li
);
return
LDAP_SUCCESS
;
}
...
...
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