View | Details | Raw Unified | Return to bug 13432
Collapse All | Expand All

(-)a/C4/SIP/SIPServer.pm (-1 / +4 lines)
Lines 230-235 sub sip_protocol_loop { Link Here
230
	my $self = shift;
230
	my $self = shift;
231
	my $service = $self->{service};
231
	my $service = $self->{service};
232
	my $config  = $self->{config};
232
	my $config  = $self->{config};
233
    my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30;
233
	my $input;
234
	my $input;
234
235
235
    # The spec says the first message will be:
236
    # The spec says the first message will be:
Lines 246-253 sub sip_protocol_loop { Link Here
246
	# 
247
	# 
247
	# In short, we'll take any valid message here.
248
	# In short, we'll take any valid message here.
248
	#my $expect = SC_STATUS;
249
	#my $expect = SC_STATUS;
250
    local $SIG{ALRM} = sub { die "SIP Timed Out!\n"; };
249
    my $expect = '';
251
    my $expect = '';
250
    while (1) {
252
    while (1) {
253
        alarm $timeout;
251
        $input = Sip::read_SIP_packet(*STDIN);
254
        $input = Sip::read_SIP_packet(*STDIN);
252
        unless ($input) {
255
        unless ($input) {
253
            return;		# EOF
256
            return;		# EOF
Lines 273-278 sub sip_protocol_loop { Link Here
273
		}
276
		}
274
		# We successfully received and processed what we were expecting
277
		# We successfully received and processed what we were expecting
275
		$expect = '';
278
		$expect = '';
279
    alarm 0;
276
	}
280
	}
277
}
281
}
278
282
279
- 

Return to bug 13432