summaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-06-04 16:22:55 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-06-04 16:22:55 -0400
commit761006cea186bf1fba9d4935667e9d6bd7ca67e7 (patch)
tree47e0055a103dc1d475041ef3227ee684c140df44 /src/map.c
parent2587019fff06097e6c026058d23d91bdac71cba0 (diff)
downloadslapi-nis-761006cea186bf1fba9d4935667e9d6bd7ca67e7.tar.gz
slapi-nis-761006cea186bf1fba9d4935667e9d6bd7ca67e7.tar.xz
slapi-nis-761006cea186bf1fba9d4935667e9d6bd7ca67e7.zip
- add a function to check if there's an entry for a given ID in a given map
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map.c b/src/map.c
index bdde29c..51f47d7 100644
--- a/src/map.c
+++ b/src/map.c
@@ -496,6 +496,19 @@ map_next(struct plugin_state *state,
return TRUE;
}
+/* Check if there's an entry with a specific ID. */
+bool_t
+map_data_check_entry(struct plugin_state *state,
+ const char *domain_name, const char *map_name,
+ const char *id)
+{
+ return (map_data_find_map_entry_id(state,
+ map_data_find_map(state,
+ domain_name,
+ map_name),
+ id) != NULL);
+}
+
/* Remove all of the entries in a map. */
static void
map_data_clear_map_map(struct plugin_state *state, struct map *map)