[PATCH] is register_iq_handler correct in Agent.pm ?
Michael Scherer
misc at mandriva.org
Tue Jan 30 14:34:14 UTC 2007
Hi,
after spending some time reading part of the code of Agent.pm, I am puzzled by
this :
sub handle_iq {
my ($self, $vhost, $stanza) = @_;
my $sig = $stanza->signature;
if ($self->{djabberd_agent_iqcb} && $self->{djabberd_agent_iqcb}{$sig}) {
return $self->{djabberd_agent_iqcb}{$sig}->($vhost, $stanza);
}
....
}
and
sub register_iq_handler {
my ($self, $signature, $handler) = @_;
$self->{easier_node_iqcb} ||= {};
$self->{easier_node_iqcb}{$signature} = $handler;
}
This part is not working, or there is something very subtle I missed ?
register_iq_handler should use djabberd_agent_iqcb, not easier_node_iqcb as a
memeber, as this is the only occurence in the source code.
Here is a patch that correct it. With it, register_iq_handler should work as
intended.
--
Michael Scherer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: djabberd.agent_register_iq_handler.patch
Type: text/x-diff
Size: 486 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/djabberd/attachments/20070130/b2f4c8b6/djabberd.agent_register_iq_handler.bin
More information about the Djabberd
mailing list