]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-ldap: dict_ldap_map - Rename into dict_ldap_map_settings
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 16 Sep 2024 12:15:29 +0000 (12:15 +0000)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 17 Jan 2025 08:40:01 +0000 (10:40 +0200)
src/lib-dict-backend/dict-ldap-settings.c
src/lib-dict-backend/dict-ldap-settings.h
src/lib-dict-backend/dict-ldap.c

index e314ae91c95a2fb401a179928875edee25861341..110bc464366e96f92135aa5a6572591e196d02d6 100644 (file)
@@ -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),
index 399607af3ec2ed82375a4038826f3ed62049ca6b..1dc17b6ab94880aa45883d20cab06d731bf99539 100644 (file)
@@ -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 *
index b65977220a4b9ec45efafffa868b33056a79a9db..a8772a26b8c2e11a8f73c3538480dc6b3eb4b832 100644 (file)
@@ -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;