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

(-)a/C4/SIP/SIPServer.pm (-4 / +5 lines)
Lines 243-249 sub sip_protocol_loop { Link Here
243
    my $self = shift;
243
    my $self = shift;
244
    my $service = $self->{service};
244
    my $service = $self->{service};
245
    my $config  = $self->{config};
245
    my $config  = $self->{config};
246
    my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30;
246
    my $timeout = $self->{service}->{client_timeout} || $config->{client_timeout};
247
247
248
    # The spec says the first message will be:
248
    # The spec says the first message will be:
249
    #     SIP v1: SC_STATUS
249
    #     SIP v1: SC_STATUS
Lines 263-275 sub sip_protocol_loop { Link Here
263
            syslog( 'LOG_DEBUG', 'Inactive: timed out' );
263
            syslog( 'LOG_DEBUG', 'Inactive: timed out' );
264
            die "Timed Out!\n";
264
            die "Timed Out!\n";
265
        };
265
        };
266
        my $previous_alarm = alarm($timeout);
266
        my $previous_alarm;
267
        $previous_alarm = alarm($timeout) if $timeout;
267
268
268
        while ( my $inputbuf = read_request() ) {
269
        while ( my $inputbuf = read_request() ) {
269
            if ( !defined $inputbuf ) {
270
            if ( !defined $inputbuf ) {
270
                return;    #EOF
271
                return;    #EOF
271
            }
272
            }
272
            alarm($timeout);
273
            alarm($timeout) if $timeout;
273
274
274
            unless ($inputbuf) {
275
            unless ($inputbuf) {
275
                syslog( "LOG_ERR", "sip_protocol_loop: empty input skipped" );
276
                syslog( "LOG_ERR", "sip_protocol_loop: empty input skipped" );
Lines 287-293 sub sip_protocol_loop { Link Here
287
            }
288
            }
288
            next if $status eq REQUEST_ACS_RESEND;
289
            next if $status eq REQUEST_ACS_RESEND;
289
        }
290
        }
290
        alarm($previous_alarm);
291
        alarm($previous_alarm) if $previous_alarm;
291
        return;
292
        return;
292
    };
293
    };
293
    if ( $@ =~ m/timed out/i ) {
294
    if ( $@ =~ m/timed out/i ) {
(-)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