-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) mod_socache_memcache: Pass expiration time through to memcached.
+ [Faidon Liambotis <paravoid debian.org>, Joe Orton]
+
*) split-logfile: Fix perl error: 'Can't use string ("example.org:80")
as a symbol ref while "strict refs"'. PR 56329.
[Holger Mauermann <mauermann gmail.com>]
return APR_EINVAL;
}
- /* In APR-util - unclear what 'timeout' is, as it was not implemented */
- rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData, 0, 0);
+ /* memcache needs time in seconds till expiry; fail if this is not
+ * positive *before* casting to unsigned (apr_uint32_t). */
+ expiry -= apr_time_now();
+ if (apr_time_sec(expiry) <= 0) {
+ return APR_EINVAL;
+ }
+ rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData,
+ apr_time_sec(expiry), 0);
if (rv != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00790)