Mercurial > dovecot > core-2.2
diff src/dsync/dsync-brain.c @ 12124:eb5adb193064
dsync: Don't crash/hang if syncing fails before ioloop is started.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 15 Sep 2010 18:59:34 +0100 |
parents | 6ef21adeb61d |
children | 447bce266022 |
line wrap: on
line diff
--- a/src/dsync/dsync-brain.c Wed Sep 15 16:28:32 2010 +0100 +++ b/src/dsync/dsync-brain.c Wed Sep 15 18:59:34 2010 +0100 @@ -900,3 +900,10 @@ dsync_worker_has_unexpected_changes(brain->src_worker) || dsync_worker_has_unexpected_changes(brain->dest_worker); } + +bool dsync_brain_has_failed(struct dsync_brain *brain) +{ + return brain->failed || + dsync_worker_has_failed(brain->src_worker) || + dsync_worker_has_failed(brain->dest_worker); +}