summaryrefslogtreecommitdiffstats
path: root/modules/session
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2015-06-23 17:38:13 +0200
committerYann Ylavic <ylavic@apache.org>2015-06-23 17:38:13 +0200
commitcd7fdfee05f198e538ea0d1ecc588960b36ae178 (patch)
tree58775a63fc27cef970ca295981c4903ae46fc426 /modules/session
parentmod_session_dbd: follow up to r1686122. (diff)
downloadapache2-cd7fdfee05f198e538ea0d1ecc588960b36ae178.tar.xz
apache2-cd7fdfee05f198e538ea0d1ecc588960b36ae178.zip
mod_session_dbd: follow up to r1687021.
Move the new pool argument of dbd_load() first as the other functions in the module (no functional change). Suggested by: mrumph git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687087 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/session')
-rw-r--r--modules/session/mod_session_dbd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/session/mod_session_dbd.c b/modules/session/mod_session_dbd.c
index 0f473ffb02..0be7306f82 100644
--- a/modules/session/mod_session_dbd.c
+++ b/modules/session/mod_session_dbd.c
@@ -97,8 +97,8 @@ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp,
*
* The session value is allocated using the passed apr_pool_t.
*/
-static apr_status_t dbd_load(request_rec * r, apr_pool_t *pool,
- const char *key, const char **val)
+static apr_status_t dbd_load(apr_pool_t *p, request_rec * r,
+ const char *key, const char **val)
{
apr_status_t rv;
@@ -141,8 +141,7 @@ static apr_status_t dbd_load(request_rec * r, apr_pool_t *pool,
return APR_EGENERAL;
}
if (*val == NULL) {
- *val = apr_pstrdup(pool,
- apr_dbd_get_entry(dbd->driver, row, 0));
+ *val = apr_pstrdup(p, apr_dbd_get_entry(dbd->driver, row, 0));
}
/* we can't break out here or row won't get cleaned up */
}
@@ -207,7 +206,7 @@ static apr_status_t session_dbd_load(request_rec * r, session_rec ** z)
/* load an RFC2109 or RFC2965 compliant cookie */
ap_cookie_read(r, name, &key, conf->remove);
if (key) {
- ret = dbd_load(r, m->pool, key, &val);
+ ret = dbd_load(m->pool, r, key, &val);
if (ret != APR_SUCCESS) {
return ret;
}
@@ -218,7 +217,7 @@ static apr_status_t session_dbd_load(request_rec * r, session_rec ** z)
/* load named session */
else if (conf->peruser) {
if (r->user) {
- ret = dbd_load(r, m->pool, r->user, &val);
+ ret = dbd_load(m->pool, r, r->user, &val);
if (ret != APR_SUCCESS) {
return ret;
}