Hanno Hecker wrote:
seems like a rather heavy hammer, which can be influenced in a very bizarre cross connection manner.
Except for using this before the 'connect' hook, I don't see where. But
...(thinking loud) maybe use the plugins_loaded() and ## Qpsmtpd.pm, run_continuation():
    $self->varlog(LOGDEBUG, $hook, $code->{name});
    my $tran = $self->transaction;
    next if $tran->plugin_disabled($code->{name}); ## new
    eval { (@r) = $code->{code}->($self, $tran, @$args); };

 ## Transaction.pm:
    my %disabled_plugins = ();
    sub plugin_disabled { $disabled_plugins{$_[1]}; }
    sub disable_plugin { $disabled_plugins{$_[1]} = 1; }
sub enable_plugin { delete $disabled_plugins{$_[1]} if exists $disabled_plugins{$_[1]}; }
Something like this?

No, cos that's still global not per tran...

I think you're not thinking of an -async environment, where the globals are shared across connections multiplexed in one process. So hooks overlap in the same process.

Matt.

Reply via email to