|
Lines 10-15
use strict;
Link Here
|
| 10 |
use warnings; |
10 |
use warnings; |
| 11 |
use Exporter; |
11 |
use Exporter; |
| 12 |
use Sys::Syslog qw(syslog); |
12 |
use Sys::Syslog qw(syslog); |
|
|
13 |
use Time::Out qw(timeout); |
| 13 |
|
14 |
|
| 14 |
use C4::SIP::Sip qw(:all); |
15 |
use C4::SIP::Sip qw(:all); |
| 15 |
use C4::SIP::Sip::Constants qw(:all); |
16 |
use C4::SIP::Sip::Constants qw(:all); |
|
Lines 385-391
sub handle {
Link Here
|
| 385 |
print("$last_response\r"); |
386 |
print("$last_response\r"); |
| 386 |
return REQUEST_ACS_RESEND; |
387 |
return REQUEST_ACS_RESEND; |
| 387 |
} |
388 |
} |
| 388 |
return ( $self->{handler}->( $self, $server ) ); # FIXME |
389 |
|
|
|
390 |
local $@; |
| 391 |
my $ret = timeout (5 => sub { |
| 392 |
$self->{handler}->( $self, $server ); |
| 393 |
}); |
| 394 |
if ($@) { |
| 395 |
C4::Context->new_dbh; |
| 396 |
$ret = $self->{handler}->( $self, $server ); |
| 397 |
} |
| 398 |
return $ret; |
| 389 |
# FIXME: Use of uninitialized value in subroutine entry |
399 |
# FIXME: Use of uninitialized value in subroutine entry |
| 390 |
# Can't use string ("") as a subroutine ref while "strict refs" in use |
400 |
# Can't use string ("") as a subroutine ref while "strict refs" in use |
| 391 |
} |
401 |
} |
|
Lines 1602-1608
sub api_auth {
Link Here
|
| 1602 |
if ($branch) { |
1612 |
if ($branch) { |
| 1603 |
$query->param( branch => $branch ); |
1613 |
$query->param( branch => $branch ); |
| 1604 |
} |
1614 |
} |
| 1605 |
my ( $status, $cookie, $sessionID ) = check_api_auth( $query, { circulate => 1 }, 'intranet' ); |
1615 |
|
|
|
1616 |
local $@; |
| 1617 |
my ( $status, $cookie, $sessionID ) = timeout (5 => sub { |
| 1618 |
check_api_auth( $query, { circulate => 1 }, 'intranet' ); |
| 1619 |
}); |
| 1620 |
if ($@) { |
| 1621 |
C4::Context->new_dbh; |
| 1622 |
( $status, $cookie, $sessionID ) = check_api_auth( $query, { circulate => 1 }, 'intranet' ); |
| 1623 |
} |
| 1606 |
return $status; |
1624 |
return $status; |
| 1607 |
} |
1625 |
} |
| 1608 |
|
1626 |
|
| 1609 |
- |
|
|