From 7ca511d8a340079d5dcb6f0bfade086b40591336 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Mon, 15 Sep 2014 16:01:57 -0700 Subject: [PATCH] move extra $rc test into block where it could have been set --- lib/Qpsmtpd.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index 49c974b..fa52a58 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -147,14 +147,16 @@ sub config { $self->log(LOGDEBUG, "in config($c)"); - # first run the hooks + # first run the user_config hooks my ($rc, @config); if (ref $type && $type->can('address')) { ($rc, @config) = $self->run_hooks_no_respond('user_config', $type, $c); + if (defined $rc && $rc == OK) { + return wantarray ? @config : $config[0]; + }; }; - if (defined $rc && $rc == OK) { - return wantarray ? @config : $config[0]; - }; + + # then run the config hooks ($rc, @config) = $self->run_hooks_no_respond('config', $c); $self->log(LOGDEBUG, "config($c): hook returned ("