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

(-)a/C4/SIP/SIPServer.pm (-4 / +8 lines)
Lines 241-247 sub sip_protocol_loop { Link Here
241
    my $self = shift;
241
    my $self = shift;
242
    my $service = $self->{service};
242
    my $service = $self->{service};
243
    my $config  = $self->{config};
243
    my $config  = $self->{config};
244
    my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30;
244
    my $timeout = $self->{service}->{client_timeout} || $config->{client_timeout};
245
    my $input;
245
    my $input;
246
246
247
    # The spec says the first message will be:
247
    # The spec says the first message will be:
Lines 258-267 sub sip_protocol_loop { Link Here
258
    #
258
    #
259
    # In short, we'll take any valid message here.
259
    # In short, we'll take any valid message here.
260
    #my $expect = SC_STATUS;
260
    #my $expect = SC_STATUS;
261
    local $SIG{ALRM} = sub { die "SIP Timed Out!\n"; };
261
    local $SIG{ALRM} = sub { die "SIP Timed Out!\n"; } if $timeout;
262
    my $expect = '';
262
    my $expect = '';
263
    while (1) {
263
    while (1) {
264
        alarm $timeout;
264
        if ($timeout) {
265
            alarm $timeout;
266
        }
265
        $input = read_SIP_packet(*STDIN);
267
        $input = read_SIP_packet(*STDIN);
266
        unless ($input) {
268
        unless ($input) {
267
            return;        # EOF
269
            return;        # EOF
Lines 287-293 sub sip_protocol_loop { Link Here
287
        }
289
        }
288
        # We successfully received and processed what we were expecting
290
        # We successfully received and processed what we were expecting
289
        $expect = '';
291
        $expect = '';
290
    alarm 0;
292
        if ($timeout ) {
293
            alarm 0;
294
        }
291
    }
295
    }
292
}
296
}
293
297
(-)a/etc/SIPconfig.xml (-7 / +13 lines)
Lines 16-27 Link Here
16
  />
16
  />
17
  
17
  
18
  <listeners>
18
  <listeners>
19
<!-- vestigial HTTP, never implemented: just use the OPAC!
20
	<service
21
      port="0:8080/tcp"
22
      transport="http"
23
      protocol="NCIP/1.0" />
24
-->
25
    <service
19
    <service
26
      port="8023/tcp"
20
      port="8023/tcp"
27
      transport="telnet"
21
      transport="telnet"
Lines 33-38 Link Here
33
      transport="RAW" 
27
      transport="RAW" 
34
      protocol="SIP/2.00"
28
      protocol="SIP/2.00"
35
      timeout="60" />
29
      timeout="60" />
30
<!-- client_timeout times out active connections which have not received
31
     input from the client. Many persistemt connections will send a status request
32
     every 5-7 mins so setting this to less than that will add instability to the connection
33
     if not set then no timeout is applied to the connection
34
     NB the parameter timeout applies to the login process only and should be set to a lower value
35
     to time out failed connections
36
-->
37
    <service
38
      port="6002/tcp"
39
      transport="RAW"
40
      protocol="SIP/2.00"
41
      timeout="60"
42
      client_timeout="600" />
36
  </listeners>
43
  </listeners>
37
44
38
  <accounts>
45
  <accounts>
39
- 

Return to bug 15006