From b3543dd041beefc61c3cdb4280278e8ca3b9aad7 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 10 Jun 2008 11:50:09 -0400 Subject: - match new prototypes, always return secure = false --- src/dummymap.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/dummymap.c b/src/dummymap.c index a3c003e..b6a336a 100644 --- a/src/dummymap.c +++ b/src/dummymap.c @@ -113,22 +113,25 @@ map_supports_domain(struct plugin_state *state, bool_t *supported) { int i; - *supported = FALSE; - for (i = 0; domains[i].domain != NULL; i++) { - if (strcmp(domains[i].domain, domain) == 0) { - *supported = TRUE; - break; + if (supported != NULL) { + *supported = FALSE; + for (i = 0; domains[i].domain != NULL; i++) { + if (strcmp(domains[i].domain, domain) == 0) { + *supported = TRUE; + break; + } } + slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, + "map_supports_domain \"%s\": %s\n", domain, + *supported ? "YES" : "NO"); } - slapi_log_error(SLAPI_LOG_PLUGIN, state->plugin_desc->spd_id, - "map_supports_domain \"%s\": %s\n", domain, - *supported ? "YES" : "NO"); return TRUE; } bool_t map_supports_map(struct plugin_state *state, - const char *domain, const char *map, bool_t *supported) + const char *domain, const char *map, bool_t *supported, + bool_t *secure) { int i, j; *supported = FALSE; @@ -140,11 +143,16 @@ map_supports_map(struct plugin_state *state, if (domains[i].domain != NULL) { for (j = 0; domains[i].maps[j].map != NULL; j++) { if (strcmp(domains[i].maps[j].map, map) == 0) { - *supported = TRUE; + if (supported != NULL) { + *supported = TRUE; + } break; } } } + if (secure != NULL) { + *secure = FALSE; + } return TRUE; } @@ -182,7 +190,7 @@ map_find_entries(const char *domain, const char *map) bool_t map_match(struct plugin_state *state, - const char *domain, const char *map, + const char *domain, const char *map, bool_t *secure, unsigned int key_len, char *key, unsigned int *value_len, char **value) { @@ -200,6 +208,7 @@ map_match(struct plugin_state *state, if (entries[i].key == NULL) { return FALSE; } + *secure = FALSE; *value = entries[i].value; *value_len = strlen(entries[i].value); return TRUE; @@ -207,7 +216,7 @@ map_match(struct plugin_state *state, bool_t map_first(struct plugin_state *state, - const char *domain, const char *map, + const char *domain, const char *map, bool_t *secure, unsigned int *first_key_len, char **first_key, unsigned int *first_value_len, char **first_value) { @@ -218,6 +227,7 @@ map_first(struct plugin_state *state, if (entries[0].key == NULL) { return FALSE; } + *secure = FALSE; *first_key = entries[0].key; *first_key_len = strlen(entries[0].key); *first_value = entries[0].value; @@ -227,7 +237,7 @@ map_first(struct plugin_state *state, bool_t map_next(struct plugin_state *state, - const char *domain, const char *map, + const char *domain, const char *map, bool_t *secure, unsigned int prev_len, const char *prev, unsigned int *next_key_len, char **next_key, unsigned int *next_value_len, char **next_value) @@ -249,6 +259,7 @@ map_next(struct plugin_state *state, if (entries[i + 1].key == NULL) { return FALSE; } + *secure = FALSE; *next_key = entries[i + 1].key; *next_key_len = strlen(entries[i + 1].key); *next_value = entries[i + 1].value; -- cgit