Although mainly hypothetical, it would still be possible to get
response from the server for an acs resend request. (This exception
is allowed in MsgType::handle.)
I also noticed that the response may well be a message from an older
session still.
This patch just removes that exception by only passing login requests
to sub handle in the raw_transport loop.
Test plan:
[1] Verify normal login procedure for raw.
[2] Check a few acs resend requests in raw. They should terminate without
a response.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
return;
}
$input =~ s/[\r\n]+$//sm; # Strip off trailing line terminator(s)
- last if C4::SIP::Sip::MsgType::handle($input, $self, LOGIN);
+ my $reg = qr/^${\(LOGIN)}/;
+ last if $input !~ $reg ||
+ C4::SIP::Sip::MsgType::handle($input, $self, LOGIN);
}
alarm 0;