]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#8772 Remove reliance on the local rmutex implementation
authorOndřej Kuzník <ondra@openldap.org>
Fri, 22 Jun 2018 12:13:41 +0000 (13:13 +0100)
committerOndřej Kuzník <ondra@openldap.org>
Fri, 19 Oct 2018 12:08:10 +0000 (13:08 +0100)
servers/slapd/overlays/accesslog.c

index f230b0dbc852c60396493aee230e74165e1a32bf..9b51020e3cc8ba25b956a96dbf05e614a2b3f624 100644 (file)
@@ -76,7 +76,7 @@ typedef struct log_info {
        struct berval li_uuid;
        int li_success;
        log_base *li_bases;
-       ldap_pvt_thread_rmutex_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_rmutex_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_rmutex_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_rmutex_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_rmutex_destroy( &li->li_op_rmutex );
+       ldap_pvt_thread_mutex_destroy( &li->li_op_rmutex );
        free( li );
        return LDAP_SUCCESS;
 }