Bug 50012

Summary: Please fix code in mod_session_dbd.c (dbd_remove)
Product: Apache httpd-2 Reporter: zhiguo zhao <zhaozg>
Component: Other ModulesAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: patch for mod_session_dbd.c (版本 1001981)

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 ***