blib/lib/Net/SIP/SocketPool.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 30 | 69 | 43.4 |
line | l | !l | condition |
---|---|---|---|
445 | 5 | 5 | $self->{'tls'} && 1 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
206 | 30 | 0 | 37 | $packet->is_response and my $fo = $self->{'tids'}{$packet->tid} |
218 | 30 | 0 | 30 | $_->{'peer'} and $_->{'peer'}{'addr'} eq $dst->{'addr'} |
286 | 141 | 20 | 5 | $self->{'loop'} and not $fo->{'inside_connect'} |
287 | 0 | 141 | 25 | not $self->{'timeout_timer'} and $fo->{'didit'} |
316 | 10 | 20 | 0 | $_->{'inside_connect'} and $tdiff > $CONNECT_TIMEOUT |
414 | 118 | 0 | 0 | shift() and not _check_from($self, $from) |
438 | 10 | 0 | 0 | $self->{'dst'} and not _check_from($self, $from) |
460 | 88 | 0 | 0 | $Net::SIP::SocketPool::DEBUG and $fo->{'rbuf'} ne '' |
488 | 86 | 0 | 0 | $hdrpos < 0 and length $fo->{'rbuf'} > $MAX_SIP_HEADER |
line | l | !l | condition |
---|---|---|---|
75 | 13 | 0 | eval 'use IO::Socket::SSL;1' && eval { do { die 'need at least version 1.956' unless 'IO::Socket::SSL'->VERSION >= 1.956; $SSL_WANT_READ = IO::Socket::SSL::SSL_WANT_READ(); $SSL_WANT_WRITE = IO::Socket::SSL::SSL_WANT_WRITE(); $SSL_VERIFY_PEER = IO::Socket::SSL::SSL_VERIFY_PEER(); $SSL_VERIFY_FAIL_IF_NO_PEER_CERT = IO::Socket::SSL::SSL_VERIFY_FAIL_IF_NO_PEER_CERT(); *SSL_ERROR = \$IO::Socket::SSL::SSL_ERROR; $SSL_REUSE_CTX = 'IO::Socket::SSL'->VERSION >= 1.969; 1 } } || die("no SSL support using IO::Socket::SSL: $@") |
91 | 38 | 0 | $tls ||= {} |
108 | 76 | 0 | 'IO::Socket::SSL::SSL_Context'->new($self->{'tls'}{$_}) || die("failed to create SSL context: $SSL_ERROR") |
114 | 103 | 0 | $proto || die('no protocol given') |
136 | 0 | 0 | $_->{'fd'} || (next) |
315 | 30 | 30 | $_->{'didit'} || (next) |
337 | 0 | 0 | $self->{'timeout_timer'} || (return) |
531 | 20 | 10 | $fo->{'tids'} ||= [] |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
75 | 25 | 13 | 0 | $CAN_TLS //= eval 'use IO::Socket::SSL;1' && eval { do { die 'need at least version 1.956' unless 'IO::Socket::SSL'->VERSION >= 1.956; $SSL_WANT_READ = IO::Socket::SSL::SSL_WANT_READ(); $SSL_WANT_WRITE = IO::Socket::SSL::SSL_WANT_WRITE(); $SSL_VERIFY_PEER = IO::Socket::SSL::SSL_VERIFY_PEER(); $SSL_VERIFY_FAIL_IF_NO_PEER_CERT = IO::Socket::SSL::SSL_VERIFY_FAIL_IF_NO_PEER_CERT(); *SSL_ERROR = \$IO::Socket::SSL::SSL_ERROR; $SSL_REUSE_CTX = 'IO::Socket::SSL'->VERSION >= 1.969; 1 } } || die("no SSL support using IO::Socket::SSL: $@") |
315 | 0 | 30 | 0 | $time ||= $self->{'loop'}->looptime |
389 | 0 | 0 | 0 | $ip ne $dst->{'addr'} or $port ne $dst->{'port'} |
470 | 0 | 0 | 0 | $!{'EAGAIN'} or $!{'EWOULDBLOCK'} |
488 | 0 | 0 | 86 | $hdrpos < 0 and length $fo->{'rbuf'} > $MAX_SIP_HEADER or $hdrpos > $MAX_SIP_HEADER |
559 | 0 | 0 | 0 | $rv || $! |
567 | 0 | 15 | 0 | $!{'EALREADY'} or $!{'EINPROGRESS'} |
622 | 0 | 0 | 0 | $!{'EAGAIN'} or $!{'EWOULDBLOCK'} |