diff options
| author | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-07-03 11:38:11 -0400 |
|---|---|---|
| committer | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> | 2008-07-03 11:38:11 -0400 |
| commit | c566e02dcd9eb33df848432dbbc94adcb749ea73 (patch) | |
| tree | 950071e789f3d0d5f639438853c3f18d9eb22ee7 /src | |
| parent | f1c806a729b9b0c345ca3baee40896d9562df993 (diff) | |
| download | slapi-nis-c566e02dcd9eb33df848432dbbc94adcb749ea73.tar.gz slapi-nis-c566e02dcd9eb33df848432dbbc94adcb749ea73.tar.xz slapi-nis-c566e02dcd9eb33df848432dbbc94adcb749ea73.zip | |
- return the backend data associated with the matching entry from the matching
functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/map.c | 10 | ||||
| -rw-r--r-- | src/map.h | 5 |
2 files changed, 11 insertions, 4 deletions
@@ -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; } @@ -38,13 +38,14 @@ bool_t map_supports_map(struct plugin_state *state, bool_t map_match(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, unsigned int key_len, char *key, - unsigned int *value_len, char **value, const char **id); + unsigned int *value_len, char **value, + const char **id, void **backend_data); bool_t map_match_id(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, const char *id_in, unsigned int id_index, unsigned int *key_len, char **key, unsigned int *value_len, char **value, - const char **id); + const char **id, void **backend_data); bool_t map_first(struct plugin_state *state, const char *domain, const char *map, bool_t *secure, unsigned int *first_key_len, char **first_key, |
