This patch ensures that when the PreFork Net::Server personality
is in use, terminal login information is not prematurely cleared
between *_transport() and sip_protocol_loop(). This, in conjunction
with the patch for bug
1463459, fixes a problem where a SIP
client that connects, issues a 93 request, then a 99 request, could
get an incorrect 98 response.
To test fixes for
1463459 and
1464748:
[1] Set up a SIP configuration with at least two institutions
with different capabilities and at least one account
for each institution. Assume that account A1 is for
institution I1 and A2 for I2.
[2] Prior to applying the patches for
1463459 and
1464748,
start the SIP server and try the following sequence:
a. 93 to log in as A2
b. 99 to get SC status
c. Note that the 98 response has values for I1, not I2
[3] Apply the patches and restart SIP, then repeat the steps
in [2]. This time, the 98 response should have the
values for I2.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
syslog("LOG_WARNING", "Unknown transport '%s', dropping", $service->{transport});
return;
} else {
+ # handle client authentication prior to
+ # passing further processing to sip_protocol_loop()
&$transport($self);
- # Transport has shut down, remove any lingering login info
- $self->{account} = undef;
}
$self->sip_protocol_loop();
syslog("LOG_INFO", '%s: shutting down', $transport);
}
+# for forking personalities, don belt and suspenders
+# and ensure that the session account is cleared when
+# a client connection ends cleanly (as opposed to the
+# Net::Server backend having been terminated).
+sub post_process_request {
+ my $self = shift;
+
+ $self->{account} = undef;
+
+}
+
# mux_input is the callback used by Net::Server to handle
# an incoming connection request when the peronsality is
# Multiplex.