Bug 50012 - Please fix code in mod_session_dbd.c (dbd_remove)
Summary: Please fix code in mod_session_dbd.c (dbd_remove)
Status: RESOLVED DUPLICATE of bug 53452
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Other Modules (show other bugs)
Version: 2.5-HEAD
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-27 12:01 UTC by zhiguo zhao
Modified: 2012-11-13 20:45 UTC (History)
0 users



Attachments
patch for mod_session_dbd.c (版本 1001981) (1.69 KB, text/plain)
2010-09-27 21:06 UTC, zhiguo zhao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zhiguo zhao 2010-09-27 12:01:29 UTC
Please update function dbd_remove to this:

static apr_status_t dbd_remove(request_rec * r, const char *key)
{
    apr_status_t rv;
    apr_dbd_prepared_t *statement;
    int rows = 0;
	ap_dbd_t *dbd;

    session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
                                                      &session_dbd_module);
	if (conf->deletelabel == NULL) {
		ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
			"no SessionDBDDeleteLabel has been specified");
		return APR_EGENERAL;
	}

	rv = dbd_init(r, conf->deletelabel, &dbd, &statement);
	if (rv) {
		return rv;
	}

    rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
                          key, NULL);
    if (rv != APR_SUCCESS) {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, LOG_PREFIX
                      "query execution error removing session '%s' "
                      "from database", key);
        return rv;
    }

    return APR_SUCCESS;
}
Comment 1 zhiguo zhao 2010-09-27 21:06:37 UTC
Created attachment 26093 [details]
patch for mod_session_dbd.c   (版本 1001981)
Comment 2 Graham Leggett 2011-05-31 22:09:55 UTC
Can you describe the bug for us, and explain what the patch is trying to do?
Comment 3 Christophe JAILLET 2012-11-13 20:45:42 UTC
Same solution in PR 53452 and there has not been any update here for more than 1 year.

--> I mark it as duplicate.

*** This bug has been marked as a duplicate of bug 53452 ***