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

(-)a/C4/SIP/SIPServer.pm (-1 / +4 lines)
Lines 238-243 sub sip_protocol_loop { Link Here
238
	my $self = shift;
238
	my $self = shift;
239
	my $service = $self->{service};
239
	my $service = $self->{service};
240
	my $config  = $self->{config};
240
	my $config  = $self->{config};
241
    my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30;
241
	my $input;
242
	my $input;
242
243
243
    # The spec says the first message will be:
244
    # The spec says the first message will be:
Lines 254-261 sub sip_protocol_loop { Link Here
254
	# 
255
	# 
255
	# In short, we'll take any valid message here.
256
	# In short, we'll take any valid message here.
256
	#my $expect = SC_STATUS;
257
	#my $expect = SC_STATUS;
258
    local $SIG{ALRM} = sub { die "SIP Timed Out!\n"; };
257
    my $expect = '';
259
    my $expect = '';
258
    while (1) {
260
    while (1) {
261
        alarm $timeout;
259
        $input = Sip::read_SIP_packet(*STDIN);
262
        $input = Sip::read_SIP_packet(*STDIN);
260
        unless ($input) {
263
        unless ($input) {
261
            return;		# EOF
264
            return;		# EOF
Lines 281-286 sub sip_protocol_loop { Link Here
281
		}
284
		}
282
		# We successfully received and processed what we were expecting
285
		# We successfully received and processed what we were expecting
283
		$expect = '';
286
		$expect = '';
287
    alarm 0;
284
	}
288
	}
285
}
289
}
286
290
287
- 

Return to bug 13432