summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2010-06-26 00:26:01 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2010-06-26 00:26:01 +0000
commit5740b5cfd9c6c14497d712b30b1496bf8f8a323a (patch)
tree0720e3e89706cb8f2f0b7a0a97c4798860e9921a /include
parent03da12600ef9cbaf628852469a3ac73d526574d6 (diff)
downloadhttpd-5740b5cfd9c6c14497d712b30b1496bf8f8a323a.tar.gz
Introduce an socache iterator 'userctx' for the user to track the
context of their own callback. Breaks API, but we probably wanted an mmn reset between .6 and .7 betas for unintentional/unnoticed ABI breaks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@958157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/ap_socache.h29
2 files changed, 18 insertions, 14 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 89cca6cc10..8f0a0adc09 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -230,12 +230,13 @@
* 20100609.0 (2.3.6-dev) Dropped ap_args_to_table due to missing constraints.
* 20100609.1 (2.3.7-dev) Introduce ap_log_cserror()
* 20100609.2 (2.3.7-dev) Add deferred write pool to core_output_filter_ctx
+ * 20100625.0 (2.3.7-dev) Add 'userctx' to socache iterator callback prototype
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20100609
+#define MODULE_MAGIC_NUMBER_MAJOR 20100625
#endif
#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */
diff --git a/include/ap_socache.h b/include/ap_socache.h
index ff90997149..e00c316f6d 100644
--- a/include/ap_socache.h
+++ b/include/ap_socache.h
@@ -61,25 +61,27 @@ struct ap_socache_hints {
/**
* Iterator callback prototype for the ap_socache_provider_t->iterate() method
- * @param instance The cache instance (passed through)
- * @param s Associated server structure (passed through)
+ * @param instance The cache instance
+ * @param s Associated server context (for logging)
+ * @param userctx User defined pointer passed from the iterator call
* @param id Unique ID for the object (binary blob)
* with a trailing null char for convenience
* @param idlen Length of id blob
* @param data Output buffer to place retrieved data (binary blob)
* with a trailing null char for convenience
* @param datalen Length of data buffer
- * @param pool Pool for temporary allocations (passed through)
+ * @param pool Pool for temporary allocations
* @return APR status value; return APR_SUCCESS or the iteration will halt;
* this value is returned to the ap_socache_provider_t->iterate() caller
*/
-typedef apr_status_t (*ap_socache_iterator_t)(ap_socache_instance_t *instance,
- server_rec *s,
- const unsigned char *id,
- unsigned int idlen,
- const unsigned char *data,
- unsigned int datalen,
- apr_pool_t *pool);
+typedef apr_status_t (ap_socache_iterator_t)(ap_socache_instance_t *instance,
+ server_rec *s,
+ void *userctx,
+ const unsigned char *id,
+ unsigned int idlen,
+ const unsigned char *data,
+ unsigned int datalen,
+ apr_pool_t *pool);
/** A socache provider structure. socache providers are registered
* with the ap_provider.h interface using the AP_SOCACHE_PROVIDER_*
@@ -193,15 +195,16 @@ typedef struct ap_socache_provider_t {
/**
* Dump all cached objects through an iterator callback.
* @param instance The cache instance
- * @param s Associated server structure (for logging purposes)
- * @param iterator The user provided callback which will receive
+ * @param s Associated server context (for processing and logging)
+ * @param userctx User defined pointer passed through to the iterator
+ * @param iterator The user provided callback function which will receive
* individual calls for each unexpired id/data pair
* @param pool Pool for temporary allocations.
* @return APR status value; APR_NOTFOUND if the object was not
* found
*/
apr_status_t (*iterate)(ap_socache_instance_t *instance, server_rec *s,
- ap_socache_iterator_t *iterator,
+ void *userctx, ap_socache_iterator_t *iterator,
apr_pool_t *pool);
} ap_socache_provider_t;