@@ -757,11 +757,11 @@ static int collection_store_ex(int db_option, modsec_rec *msr, apr_table_t *col)
757757if (blob == NULL ) {
758758if (apr_dbm != NULL ) {
759759#ifdef GLOBAL_COLLECTION_LOCK
760- apr_sdbm_close (dbm );
760+ apr_sdbm_close (apr_dbm );
761761apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
762762#else
763- apr_sdbm_unlock (dbm );
764- apr_sdbm_close (dbm );
763+ apr_sdbm_unlock (apr_dbm );
764+ apr_sdbm_close (apr_dbm );
765765#endif
766766 }
767767return -1 ;
@@ -836,22 +836,22 @@ static int collection_store_ex(int db_option, modsec_rec *msr, apr_table_t *col)
836836get_apr_error (msr -> mp ,rc ));
837837if (apr_dbm != NULL ) {
838838#ifdef GLOBAL_COLLECTION_LOCK
839- apr_sdbm_close (dbm );
839+ apr_sdbm_close (apr_dbm );
840840apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
841841#else
842- apr_sdbm_unlock (dbm );
843- apr_sdbm_close (dbm );
842+ apr_sdbm_unlock (apr_dbm );
843+ apr_sdbm_close (apr_dbm );
844844#endif
845845 }
846846
847847return -1 ;
848848 }
849849#ifdef GLOBAL_COLLECTION_LOCK
850- apr_sdbm_close (dbm );
850+ apr_sdbm_close (apr_dbm );
851851apr_global_mutex_unlock (msr -> modsecurity -> dbm_lock );
852852#else
853- apr_sdbm_unlock (dbm );
854- apr_sdbm_close (dbm );
853+ apr_sdbm_unlock (apr_dbm );
854+ apr_sdbm_close (apr_dbm );
855855#endif
856856 }
857857
@@ -955,7 +955,7 @@ static int collections_remove_stale_ex(int db_option, modsec_rec *msr, const cha
955955keys_arr = apr_array_make (msr -> mp ,256 ,sizeof (char * ));
956956
957957#ifndef GLOBAL_COLLECTION_LOCK
958- rc = apr_sdbm_lock (dbm ,APR_FLOCK_SHARED );
958+ rc = apr_sdbm_lock (apr_dbm ,APR_FLOCK_SHARED );
959959if (rc != APR_SUCCESS ) {
960960msr_log (msr ,1 ,"collections_remove_stale: Failed to lock DBM file \"%s\": %s" ,log_escape (msr -> mp ,dbm_filename ),
961961get_apr_error (msr -> mp ,rc ));
@@ -975,7 +975,7 @@ static int collections_remove_stale_ex(int db_option, modsec_rec *msr, const cha
975975rc = apr_sdbm_nextkey (apr_dbm ,& key );
976976 }
977977#ifndef GLOBAL_COLLECTION_LOCK
978- apr_sdbm_unlock (dbm );
978+ apr_sdbm_unlock (apr_dbm );
979979#endif
980980
981981if (msr -> txcfg -> debuglog_level >=9 ) {