From c8e3d0020fd37ef647ba99ff207b4debaef59279 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 25 Jul 2014 15:15:05 -0400 Subject: [PATCH] Save state in the new world Signed-off-by: Mike Rylander --- SIPServer.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SIPServer.pm b/SIPServer.pm index a3595a5..9c5aa84 100644 --- a/SIPServer.pm +++ b/SIPServer.pm @@ -280,6 +280,9 @@ sub mux_input { exit(0); } + # Grab any state data for later + $self->{state} = $self->{ils}->state() if (UNIVERSAL::can($self->{ils},'state')); + # Evergreen, at least, needs a chance to clean up before forking for other requests $self->{ils}->disconnect() if (UNIVERSAL::can($self->{ils},'disconnect')); @@ -312,7 +315,7 @@ sub mux_input { if ($pid == 0) { # in kid # build the connection we deleted after logging in - $self->{ils} = $active_connections{$conn_id}->{ils}->new($self->{institution}, $self->{account}, $active_connections{$conn_id}->{state}); + $self->{ils} = $active_connections{$conn_id}->{ils}->new($self->{institution}, $self->{account}, $self->{state}); if (!$self->{ils}) { syslog('LOG_ERR', "Unable to build ILS module in mux child"); -- 2.11.0