From: Timo Sirainen Date: Tue, 20 Jul 2010 16:21:29 +0000 (+0100) Subject: lib-storage: Fixed hooks with plugins that didn't override any vfuncs X-Git-Tag: 2.0.rc3~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38def99d3e82431da4a48723784f895a1cd1fb5d;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fixed hooks with plugins that didn't override any vfuncs --- diff --git a/src/lib-storage/mail-storage-hooks.c b/src/lib-storage/mail-storage-hooks.c index abba9e447c..b8b85de8fb 100644 --- a/src/lib-storage/mail-storage-hooks.c +++ b/src/lib-storage/mail-storage-hooks.c @@ -203,6 +203,11 @@ static void hook_build_update(struct hook_build_context *ctx, void *_vlast) void (**vlast)() = _vlast; struct hook_stack *stack; + if (ctx->tail->vfuncs == vlast) { + /* no vfuncs overridden */ + return; + } + /* ctx->vfuncs_stack->vfuncs points to the root vfuncs, ctx->vfuncs_stack->next->vfuncs points to the first super function that is being called, and so on.