# Multiplex.
my %kid_hash;
-my $kid_count;
+my $kid_count = 0;
sub REAPER {
for (keys(%kid_hash)) {
# build the connection we deleted after logging in
$self->{ils} = $active_connections{$conn_id}->{ils}->new($self->{institution}, $self->{account});
+ if (!$self->{ils}) {
+ syslog('LOG_ERR', "Unable to build ILS module in mux child");
+ exit(0);
+ }
+
# build the connection we deleted after logging in
my $input = Sip::read_SIP_packet($str_fh);
$input =~ s/[\r\n]+$//sm; # Strip off any trailing line ends
sub mux_close {
my ($self, $mux, $fh) = @_;
delete $active_connections{''.$fh};
- syslog("LOG_DEBUG", "multi: cleaning up child: $fh; ".
+ syslog("LOG_DEBUG", "multi: mux_close cleaning up child: $fh; ".
scalar(keys %active_connections)." remain");
}