From: Marco Bettini Date: Mon, 16 Sep 2024 12:15:29 +0000 (+0000) Subject: dict-ldap: dict_ldap_map - Rename into dict_ldap_map_settings X-Git-Tag: 2.4.0~156 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f52742649a32b8d2404b83d65533503f97261222;p=thirdparty%2Fdovecot%2Fcore.git dict-ldap: dict_ldap_map - Rename into dict_ldap_map_settings --- diff --git a/src/lib-dict-backend/dict-ldap-settings.c b/src/lib-dict-backend/dict-ldap-settings.c index e314ae91c9..110bc46436 100644 --- a/src/lib-dict-backend/dict-ldap-settings.c +++ b/src/lib-dict-backend/dict-ldap-settings.c @@ -30,7 +30,7 @@ struct setting_parser_ctx { struct dict_ldap_settings *set; enum section_type type; - struct dict_ldap_map cur_map; + struct dict_ldap_map_settings cur_map; ARRAY(struct dict_ldap_map_attribute) cur_attributes; }; @@ -38,9 +38,9 @@ struct setting_parser_ctx { #undef DEF_BOOL #undef DEF_UINT -#define DEF_STR(name) DEF_STRUCT_STR(name, dict_ldap_map) -#define DEF_BOOL(name) DEF_STRUCT_BOOL(name, dict_ldap_map) -#define DEF_UINT(name) DEF_STRUCT_UINT(name ,dict_ldap_map) +#define DEF_STR(name) DEF_STRUCT_STR(name, dict_ldap_map_settings) +#define DEF_BOOL(name) DEF_STRUCT_BOOL(name, dict_ldap_map_settings) +#define DEF_UINT(name) DEF_STRUCT_UINT(name ,dict_ldap_map_settings) static const struct setting_def dict_ldap_map_setting_defs[] = { DEF_STR(pattern), diff --git a/src/lib-dict-backend/dict-ldap-settings.h b/src/lib-dict-backend/dict-ldap-settings.h index 399607af3e..1dc17b6ab9 100644 --- a/src/lib-dict-backend/dict-ldap-settings.h +++ b/src/lib-dict-backend/dict-ldap-settings.h @@ -1,7 +1,7 @@ #ifndef DICT_LDAP_SETTINGS_H #define DICT_LDAP_SETTINGS_H -struct dict_ldap_map { +struct dict_ldap_map_settings { /* pattern is in simplified form: all variables are stored as simple '$' character. fields array is sorted by the variable index. */ const char *pattern; @@ -26,7 +26,7 @@ struct dict_ldap_settings { unsigned int debug; bool require_ssl; bool start_tls; - ARRAY(struct dict_ldap_map) parsed_maps; + ARRAY(struct dict_ldap_map_settings) parsed_maps; }; struct dict_ldap_settings * diff --git a/src/lib-dict-backend/dict-ldap.c b/src/lib-dict-backend/dict-ldap.c index b65977220a..a8772a26b8 100644 --- a/src/lib-dict-backend/dict-ldap.c +++ b/src/lib-dict-backend/dict-ldap.c @@ -24,7 +24,7 @@ struct ldap_dict; struct dict_ldap_op { struct ldap_dict *dict; struct event *event; - const struct dict_ldap_map *map; + const struct dict_ldap_map_settings *map; pool_t pool; unsigned long txid; struct dict_lookup_result res; @@ -58,7 +58,7 @@ void ldap_dict_lookup_async(struct dict *dict, static bool -dict_ldap_map_match(const struct dict_ldap_map *map, const char *path, +dict_ldap_map_match(const struct dict_ldap_map_settings *map, const char *path, ARRAY_TYPE(const_string) *values) { const char *pat, *attribute, *p; @@ -102,11 +102,11 @@ dict_ldap_map_match(const struct dict_ldap_map *map, const char *path, return *pat == '\0' && *path == '\0'; } -static const struct dict_ldap_map * +static const struct dict_ldap_map_settings * ldap_dict_find_map(struct ldap_dict *dict, const char *path, ARRAY_TYPE(const_string) *values) { - const struct dict_ldap_map *maps; + const struct dict_ldap_map_settings *maps; unsigned int i, count; t_array_init(values, 2); @@ -158,7 +158,7 @@ static const char *ldap_escape(const char *str) static bool ldap_dict_build_query(const struct dict_op_settings *set, - const struct dict_ldap_map *map, + const struct dict_ldap_map_settings *map, ARRAY_TYPE(const_string) *values, bool priv, string_t *query_r, const char **error_r) { @@ -423,7 +423,7 @@ void ldap_dict_lookup_async(struct dict *dict, ARRAY_TYPE(const_string) values; const char *attributes[2] = {0, 0}; t_array_init(&values, 8); - const struct dict_ldap_map *map = ldap_dict_find_map(ctx, key, &values); + const struct dict_ldap_map_settings *map = ldap_dict_find_map(ctx, key, &values); if (map != NULL) { op->map = map;