dovecot-2.1: director: Fixed potential assert crash when moving ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Feb 8 23:27:35 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/24eec256a761
changeset: 14077:24eec256a761
user: Timo Sirainen <tss at iki.fi>
date: Wed Feb 08 23:27:22 2012 +0200
description:
director: Fixed potential assert crash when moving a user to another backend.
diffstat:
src/director/main.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r d4e7052af42a -r 24eec256a761 src/director/main.c
--- a/src/director/main.c Wed Feb 08 23:05:26 2012 +0200
+++ b/src/director/main.c Wed Feb 08 23:27:22 2012 +0200
@@ -113,6 +113,7 @@
static void director_state_changed(struct director *dir)
{
struct director_request *const *requestp;
+ ARRAY_DEFINE(new_requests, struct director_request *);
bool ret;
if (!dir->ring_synced ||
@@ -120,11 +121,16 @@
return;
/* if there are any pending client requests, finish them now */
+ t_array_init(&new_requests, 8);
array_foreach(&dir->pending_requests, requestp) {
ret = director_request_continue(*requestp);
- i_assert(ret);
+ if (!ret) {
+ /* request for a user being killed */
+ array_append(&new_requests, requestp, 1);
+ }
}
array_clear(&dir->pending_requests);
+ array_append_array(&dir->pending_requests, &new_requests);
if (dir->to_request != NULL)
timeout_remove(&dir->to_request);
More information about the dovecot-cvs
mailing list