Mercurial > dovecot > core-2.2
changeset 18699:6a40cb15e48f
replication plugin: A small optimization to check the user's "dsyncing" status only once.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 15 May 2015 13:48:45 +0300 |
parents | b19ca4214e63 |
children | 7cf62f28fd62 |
files | src/plugins/replication/replication-plugin.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/replication/replication-plugin.c Fri May 15 13:27:29 2015 +0300 +++ b/src/plugins/replication/replication-plugin.c Fri May 15 13:48:45 2015 +0300 @@ -184,12 +184,6 @@ { struct replication_user *ruser; - if (ns->user->dsyncing) { - /* we're running dsync, which means that the remote is telling - us about a change. don't trigger a replication back to it */ - return; - } - ruser = REPLICATION_USER_CONTEXT(ns->user); if (ruser == NULL) return; @@ -320,6 +314,12 @@ if (value == NULL || value[0] == '\0') return; + if (user->dsyncing) { + /* we're running dsync, which means that the remote is telling + us about a change. don't trigger a replication back to it */ + return; + } + ruser = p_new(user->pool, struct replication_user, 1); ruser->module_ctx.super = *v; user->vlast = &ruser->module_ctx.super;