Mercurial > dovecot > core-2.2
changeset 14270:633e587446d8
replicator: Queue handling was pretty broken
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 04 Mar 2012 12:04:46 +0200 |
parents | 9d47be37afeb |
children | 3b258bb9a03f |
files | src/replication/replicator/replicator-queue.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/replication/replicator/replicator-queue.c Sun Mar 04 11:23:14 2012 +0200 +++ b/src/replication/replicator/replicator-queue.c Sun Mar 04 12:04:46 2012 +0200 @@ -111,6 +111,7 @@ if (user == NULL) { user = i_new(struct replicator_user, 1); user->username = i_strdup(username); + hash_table_insert(queue->user_hash, user->username, user); } else { if (user->priority > priority) { /* user already has a higher priority than this */ @@ -237,6 +238,8 @@ void replicator_queue_push(struct replicator_queue *queue, struct replicator_user *user) { + i_assert(user->popped); + priorityq_add(queue->user_queue, &user->item); user->popped = FALSE;