From c566e02dcd9eb33df848432dbbc94adcb749ea73 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 3 Jul 2008 11:38:11 -0400 Subject: - return the backend data associated with the matching entry from the matching functions --- src/map.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/map.c') diff --git a/src/map.c b/src/map.c index e083ffc..3c2d248 100644 --- a/src/map.c +++ b/src/map.c @@ -425,7 +425,7 @@ map_match(struct plugin_state *state, bool_t *secure, unsigned int key_len, char *key, unsigned int *value_len, char **value, - const char **id) + const char **id, void **backend_data) { struct map *map; struct map_entry *entry; @@ -441,6 +441,9 @@ map_match(struct plugin_state *state, *value_len = entry->value_len; *value = entry->value; *id = entry->id; + if (backend_data != NULL) { + *backend_data = entry->backend_data; + } return TRUE; } @@ -451,7 +454,7 @@ map_match_id(struct plugin_state *state, const char *in_id, unsigned int in_key_index, unsigned int *key_len, char **key, unsigned int *value_len, char **value, - const char **id) + const char **id, void **backend_data) { struct map *map; struct map_entry *entry; @@ -475,6 +478,9 @@ map_match_id(struct plugin_state *state, *value_len = entry->value_len; *value = entry->value; *id = entry->id; + if (backend_data != NULL) { + *backend_data = entry->backend_data; + } return TRUE; } -- cgit