@@ -133,7 +133,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
133133 if (rc != APR_SUCCESS ) {
134134 dbm = NULL ;
135135#ifdef GLOBAL_COLLECTION_LOCK
136- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
136+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
137137#endif
138138 goto cleanup ;
139139 }
@@ -169,7 +169,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
169169 if (existing_dbm == NULL ) {
170170 apr_sdbm_close (dbm );
171171#ifdef GLOBAL_COLLECTION_LOCK
172- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
172+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
173173#endif
174174 dbm = NULL ;
175175 }
@@ -228,7 +228,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
228228 log_escape (msr -> mp , dbm_filename ), get_apr_error (msr -> mp , rc ));
229229 dbm = NULL ;
230230#ifdef GLOBAL_COLLECTION_LOCK
231- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
231+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
232232#endif
233233 goto cleanup ;
234234 }
@@ -253,7 +253,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
253253 if (existing_dbm == NULL ) {
254254 apr_sdbm_close (dbm );
255255#ifdef GLOBAL_COLLECTION_LOCK
256- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
256+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
257257#endif
258258 dbm = NULL ;
259259 }
@@ -318,7 +318,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
318318
319319 apr_sdbm_close (dbm );
320320#ifdef GLOBAL_COLLECTION_LOCK
321- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
321+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
322322#endif
323323 }
324324
@@ -329,7 +329,7 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
329329 if ((existing_dbm == NULL ) && dbm ) {
330330 apr_sdbm_close (dbm );
331331#ifdef GLOBAL_COLLECTION_LOCK
332- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
332+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_retrieve_ex" );
333333#endif
334334 }
335335
@@ -461,7 +461,7 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
461461 CREATEMODE , msr -> mp );
462462 if (rc != APR_SUCCESS ) {
463463#ifdef GLOBAL_COLLECTION_LOCK
464- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
464+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_store" );
465465#endif
466466 msr_log (msr , 1 , "collection_store: Failed to access DBM file \"%s\": %s" , log_escape (msr -> mp , dbm_filename ),
467467 get_apr_error (msr -> mp , rc ));
@@ -544,7 +544,7 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
544544 if (dbm != NULL ) {
545545#ifdef GLOBAL_COLLECTION_LOCK
546546 apr_sdbm_close (dbm );
547- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
547+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_store" );
548548#else
549549 apr_sdbm_unlock (dbm );
550550 apr_sdbm_close (dbm );
@@ -607,7 +607,7 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
607607 if (dbm != NULL ) {
608608#ifdef GLOBAL_COLLECTION_LOCK
609609 apr_sdbm_close (dbm );
610- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
610+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_store" );
611611#else
612612 apr_sdbm_unlock (dbm );
613613 apr_sdbm_close (dbm );
@@ -619,7 +619,7 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
619619
620620#ifdef GLOBAL_COLLECTION_LOCK
621621 apr_sdbm_close (dbm );
622- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
622+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collection_store" );
623623#else
624624 apr_sdbm_unlock (dbm );
625625 apr_sdbm_close (dbm );
@@ -680,7 +680,7 @@ int collections_remove_stale(modsec_rec *msr, const char *col_name) {
680680 CREATEMODE , msr -> mp );
681681 if (rc != APR_SUCCESS ) {
682682#ifdef GLOBAL_COLLECTION_LOCK
683- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
683+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collections_remove_stale" );
684684#endif
685685 msr_log (msr , 1 , "collections_remove_stale: Failed to access DBM file \"%s\": %s" , log_escape (msr -> mp , dbm_filename ),
686686 get_apr_error (msr -> mp , rc ));
@@ -783,7 +783,7 @@ int collections_remove_stale(modsec_rec *msr, const char *col_name) {
783783
784784 apr_sdbm_close (dbm );
785785#ifdef GLOBAL_COLLECTION_LOCK
786- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
786+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collections_remove_stale" );
787787#endif
788788 return 1 ;
789789
@@ -792,7 +792,7 @@ int collections_remove_stale(modsec_rec *msr, const char *col_name) {
792792 if (dbm ) {
793793 apr_sdbm_close (dbm );
794794#ifdef GLOBAL_COLLECTION_LOCK
795- apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
795+ msr_global_mutex_unlock (msr , msr -> modsecurity -> dbm_lock , "collections_remove_stale" );
796796#endif
797797 }
798798
0 commit comments