Subject: | Logic error in Net::SIP::Endpoint::Context::handle_response |
Date: | Wed, 16 Apr 2008 17:49:06 +0200 |
To: | bug-Net-SIP [...] rt.cpan.org |
From: | Roland Mas <lolando [...] debian.org> |
Hi,
The beginning of the handle_response method looks like this:
# find and remove transaction because I got response for it
# if response does not terminates transaction one need to add
# it again
my $tid = $response->tid;
my $trans = $self->{_transactions};
my (@ntrans,$tr);
foreach my $t (@$trans) {
if ( $t->{tid} eq $tid ) {
$tr = $t;
} else {
push @ntrans,$tr
}
}
From reading the comment and the following "$tr || do {...}" block,
I believe that else clause should actually do "push @ntrans, $t".
This fixes a bug I have here: "Use of uninitialized value in string eq
at /usr/share/perl5/Net/SIP/Endpoint/Context.pm line 249." warning,
and no further processing of packets (no sessions established) from
then on.
Roland.
--
Roland Mas
Qui trop embrasse rate son train.