]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-login: Clarify variable naming of login ID param
authorKarl Fleischmann <karl.fleischmann@open-xchange.com>
Mon, 6 Mar 2023 14:56:05 +0000 (15:56 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 31 Mar 2023 05:54:46 +0000 (05:54 +0000)
client_try_update_info() returns a boolean value that represents whether
the given key has a login ID parameter handler, i.e. it is a login ID
parameter. This commit changes the name to represent this more clearly.

src/imap-login/imap-login-cmd-id.c

index a36f8533cb049f840bc57d43604f464798e51c25..c6ccc1c38dc34ec741b51471e99fa58c7564f09d 100644 (file)
@@ -134,15 +134,13 @@ static void cmd_id_handle_keyvalue(struct imap_client *client,
                                   struct imap_id_log_entry *log_entry,
                                   const char *key, const char *value)
 {
-       bool client_id_str;
        /* length of key + length of value (NIL for NULL) and two set of
           quotes and space */
        size_t kvlen = strlen(key) + 2 + 1 +
                       (value == NULL ? 3 : strlen(value)) + 2;
+       bool is_login_id_param = client_try_update_info(client, key, value);
 
-       client_id_str = !client_try_update_info(client, key, value);
-
-       if (client->set->imap_id_retain && client_id_str &&
+       if (client->set->imap_id_retain && !is_login_id_param &&
            (client->common.client_id == NULL ||
             str_len(client->common.client_id) + kvlen < LOGIN_MAX_CLIENT_ID_LEN)) {
                if (client->common.client_id == NULL) {