]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict: Remove unnecessary parsing of value_type parameter in handshake
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 9 Jun 2025 08:20:13 +0000 (11:20 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 16 Jul 2025 10:16:26 +0000 (10:16 +0000)
It's not actually used for anything

src/dict/dict-connection.c
src/dict/dict-connection.h

index 45438283ddacd7ff4bfe0797ee8558897a6fe933..2cf80af8577e4c90c795a746ea353c749474a4e8 100644 (file)
@@ -26,11 +26,12 @@ struct connection_list *dict_connections = NULL;
 static int dict_connection_handshake_args(struct connection *_conn,
                                          const char *const *args)
 {
-       unsigned int major, value_type_num;
+       unsigned int major;
        struct dict_connection *conn =
                container_of(_conn, struct dict_connection, conn);
 
-       /* protocol handshake is 'H' major <tab> minor <tab> value_type */
+       /* protocol handshake is:
+          'H' major <tab> minor <tab> 0 <tab> <tab> dict_name */
        if (str_array_length(args) < 5 || **args != 'H')
                return -1;
 
@@ -41,12 +42,6 @@ static int dict_connection_handshake_args(struct connection *_conn,
            major != DICT_CLIENT_PROTOCOL_MAJOR_VERSION)
                return -1;
 
-       /* check value type */
-       if (str_to_uint(args[2], &value_type_num) < 0 ||
-           value_type_num >= DICT_DATA_TYPE_LAST)
-               return -1;
-
-       conn->value_type = (enum dict_data_type)value_type_num;
        conn->name = i_strdup(args[4]);
 
        /* try initialize the given dict */
index 2241dade79f0779e863650730dab0252b8c3b448..d8f278fe7a36275855d0729a17b5a6d4658da929 100644 (file)
@@ -18,7 +18,6 @@ struct dict_connection {
 
        char *name;
        struct dict *dict;
-       enum dict_data_type value_type;
 
        struct timeout *to_unref;