]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Use time_to_uint32() to cast time_t to unsigned int where needed
authorMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Wed, 4 May 2022 15:20:15 +0000 (18:20 +0300)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Wed, 4 May 2022 15:20:15 +0000 (18:20 +0300)
src/director/director-connection.c
src/director/user-directory.c

index 5af7bde93e453f6d06855a170d5dff70a2489712..f2b38ab2e03d34346f7fdc813848e0a196cae351 100644 (file)
@@ -752,7 +752,7 @@ director_user_refresh(struct director_connection *conn,
                e_debug(conn->event, "user refresh: %u refreshed timestamp from %u to %"PRIdTIME_T,
                        username_hash, user->timestamp, timestamp);
                user_directory_refresh(users, user);
-               user->timestamp = timestamp;
+               user->timestamp = time_to_uint32(timestamp);
                ret = TRUE;
        } else {
                e_debug(conn->event, "user refresh: %u ignored timestamp %"PRIdTIME_T" (we have %u)",
index ec57e9f3f18ba9c99af993602cc3ecadc7d2ec10..f785eec8af10c11cb68d4d2ebf13380e4600a874 100644 (file)
@@ -158,7 +158,7 @@ user_directory_add(struct user_directory *dir, unsigned int username_hash,
        user->username_hash = username_hash;
        user->host = host;
        user->host->user_count++;
-       user->timestamp = timestamp;
+       user->timestamp = time_to_uint32(timestamp);
        DLLIST2_APPEND(&dir->head, &dir->tail, user);
 
        if (dir->to_expire == NULL) {