Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6f6dff

Browse files
Mladen TurkFelipe Zimmerle
Mladen Turk
authored and
Felipe Zimmerle
committed
Move locking before table update
1 parent84d2f30 commitc6f6dff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎apache2/persist_dbm.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
384384
log_escape(msr->mp,dbm_filename));
385385
}
386386

387+
/* Need to lock to pull in the stored data again and apply deltas. */
388+
rc=apr_global_mutex_lock(msr->modsecurity->dbm_lock);
389+
if (rc!=APR_SUCCESS) {
390+
msr_log(msr,1,"collection_store: Failed to lock proc mutex: %s",
391+
get_apr_error(msr->mp,rc));
392+
gotoerror;
393+
}
394+
387395
/* Delete IS_NEW on store. */
388396
apr_table_unset(col,"IS_NEW");
389397

@@ -431,14 +439,6 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
431439
var->value=apr_psprintf(msr->mp,"%d",counter+1);
432440
var->value_len=strlen(var->value);
433441
}
434-
435-
/* Need to lock to pull in the stored data again and apply deltas. */
436-
rc=apr_global_mutex_lock(msr->modsecurity->dbm_lock);
437-
if (rc!=APR_SUCCESS) {
438-
msr_log(msr,1,"collection_store: Failed to lock proc mutex: %s",
439-
get_apr_error(msr->mp,rc));
440-
gotoerror;
441-
}
442442

443443
/* ENH Make the expiration timestamp accessible in blob form so that
444444
* it is easier/faster to determine expiration without having to

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp