diff options
Diffstat (limited to 'src/back-sch.c')
-rw-r--r-- | src/back-sch.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/back-sch.c b/src/back-sch.c index b62231e..49e1dd5 100644 --- a/src/back-sch.c +++ b/src/back-sch.c @@ -1006,6 +1006,28 @@ backend_compare_cb(Slapi_PBlock *pb) return ret; } +/* Warn if a set is empty. */ +void +backend_check_empty(struct plugin_state *state, + const char *group, const char *set) +{ + unsigned int first_key_len, first_value_len; + int first_key_index; + const char *first_id; + char *first_key, *first_value; + bool_t map_secure; + if (!map_first(state, group, set, + &map_secure, + &first_key_len, &first_key, + &first_value_len, &first_value, + &first_id, + &first_key_index)) { + slapi_log_error(SLAPI_LOG_FATAL, state->plugin_desc->spd_id, + "warning: no entries set up under %s,%s\n", + set, group); + } +} + /* Populate our data cache. */ void backend_startup(struct plugin_state *state) |