Skip to content

Commit

Permalink
Increases the loglevel while failed to delete a collection
Browse files Browse the repository at this point in the history
One of the reasons that sdbm failed to delete a key is the fact that it may
already been excluded). The error logs are not clear regarding that. Check
if the key exists prior to delete will generate unecessary computation. This
commit increases the loglevel of the error message and makes it acts like the
operation was successfully accomplished.
  • Loading branch information
Felipe Zimmerle committed Oct 31, 2014
1 parent 0318b10 commit d727acc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apache2/persist_dbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,13 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec

rc = apr_sdbm_delete(dbm, key);
if (rc != APR_SUCCESS) {
msr_log(msr, 1, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
"key \"%s\"): %s", log_escape(msr->mp, col_name),
msr_log(msr, 9, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
"key \"%s\"): %s (It may already have been excluded).", log_escape(msr->mp, col_name),
log_escape_ex(msr->mp, col_key, col_key_len), get_apr_error(msr->mp, rc));
msr->msc_sdbm_delete_error = 1;
goto cleanup;
/*goto cleanup;*/
}


if (existing_dbm == NULL) {
apr_sdbm_close(dbm);
dbm = NULL;
Expand Down

0 comments on commit d727acc

Please sign in to comment.