dovecot-2.2: replication plugin: Don't crash for users who don't...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Apr 13 07:06:10 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/631cd10e62b2
changeset: 18400:631cd10e62b2
user: Timo Sirainen <tss at iki.fi>
date: Mon Apr 13 10:04:47 2015 +0300
description:
replication plugin: Don't crash for users who don't have replication enabled.
diffstat:
src/plugins/replication/replication-plugin.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r 6bde7868cffd -r 631cd10e62b2 src/plugins/replication/replication-plugin.c
--- a/src/plugins/replication/replication-plugin.c Wed Apr 08 13:55:35 2015 +0900
+++ b/src/plugins/replication/replication-plugin.c Mon Apr 13 10:04:47 2015 +0300
@@ -191,6 +191,8 @@
}
ruser = REPLICATION_USER_CONTEXT(ns->user);
+ if (ruser == NULL)
+ return;
if (priority == REPLICATION_PRIORITY_SYNC) {
if (replication_notify_sync(ns->user) == 0) {
@@ -254,7 +256,7 @@
REPLICATION_USER_CONTEXT(ctx->ns->user);
enum replication_priority priority;
- if (ctx->new_messages || changes->changed) {
+ if (ruser != NULL && (ctx->new_messages || changes->changed)) {
priority = !ctx->new_messages ? REPLICATION_PRIORITY_LOW :
ruser->sync_secs == 0 ? REPLICATION_PRIORITY_HIGH :
REPLICATION_PRIORITY_SYNC;
More information about the dovecot-cvs
mailing list