View | Details | Raw Unified | Return to bug 53452
Collapse All | Expand All

(-)modules/session/mod_session_dbd.c (-16 / +4 lines)
Lines 333-350 Link Here
333
{
333
{
334
334
335
    apr_status_t rv;
335
    apr_status_t rv;
336
    ap_dbd_t *dbd = NULL;
336
    apr_dbd_prepared_t *statement;
337
    apr_dbd_prepared_t *statement;
337
    int rows = 0;
338
    int rows = 0;
338
339
339
    session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
340
    session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
340
                                                      &session_dbd_module);
341
                                                      &session_dbd_module);
341
    ap_dbd_t *dbd = session_dbd_acquire_fn(r);
342
    if (dbd == NULL) {
343
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01861)
344
                      "failed to acquire database connection to remove "
345
                      "session with key '%s'", key);
346
        return APR_EGENERAL;
347
    }
348
342
349
    if (conf->deletelabel == NULL) {
343
    if (conf->deletelabel == NULL) {
350
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01862)
344
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01862)
Lines 352-368 Link Here
352
        return APR_EGENERAL;
346
        return APR_EGENERAL;
353
    }
347
    }
354
348
355
    statement = apr_hash_get(dbd->prepared, conf->deletelabel,
349
    rv = dbd_init(r, conf->deletelabel, &dbd, &statement);
356
                             APR_HASH_KEY_STRING);
350
357
    if (statement == NULL) {
358
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01863)
359
                      "prepared statement could not be found for "
360
                      "SessionDBDdeletelabel with the label '%s'",
361
                      conf->deletelabel);
362
        return APR_EGENERAL;
363
    }
364
    rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
351
    rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
365
                          key, NULL);
352
                          key, NULL);
353
366
    if (rv != APR_SUCCESS) {
354
    if (rv != APR_SUCCESS) {
367
        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01864)
355
        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01864)
368
                      "query execution error removing session '%s' "
356
                      "query execution error removing session '%s' "

Return to bug 53452