Condition Coverage

blib/lib/Net/SIP/Dispatcher.pm
Criterion Covered Total %
condition 60 136 44.1


and 3 conditions

line !l l&&!r l&&r condition
84 0 0 0 $proto && $proto eq 'tls'
233 65 0 0 exists $h->{'rport'} and not defined $h->{'rport'}
525 0 10 8 @$retransmits and $retransmits->[0] < $now
589 72 232 0 $leg and @{$qentry->{'leg'};} > 1
594 109 0 195 $dst_addr and $leg
627 98 67 30 $qentry->{'retransmits'} and not $leg->do_retransmits
635 0 88 0 not $error and $qentry->{'retransmits'}
700 116 0 0 $allowed_proto and @$allowed_proto
741 0 35 81 $d2p and %$d2p
757 45 71 0 not @$dst_addr and my $addr = $self->{'outgoing_proxy'}
765 45 0 71 not @$dst_addr and $ip_addr
800 0 112 4 @resp and my $proto = $param->{'transport'}
839 0 0 116 $resp and @$resp
1042 0 0 0 $Net::SIP::Dispatcher::DEBUG and DEBUG_DUMP(100, [$qid, $ans])
1144 0 0 0 @$results && $results
1275 72 56 52 $self->{'leg'}[0] and not $self->{'leg'}[0]->do_retransmits
1287 9 8 17 $p->code > 100 and $p->cseq =~ /\sINVITE$/
1315 228 153 357 $t2 and $to > $t2
1336 0 0 0 @$addr && $addr->[0]

or 2 conditions

line l !l condition
77 27 28 $domain2proxy ||= {}
139 0 0 $self->_find_leg4addr($outgoing_proxy) || die("cannot find leg for destination $outgoing_proxy")
714 116 0 $dst_addr ||= []
715 0 116 $allowed_legs ||= [$self->get_legs]
1045 0 0 $state->{'results'} ||= []
1163 0 0 eval { do { require Net::DNS; die 'version too old, need 0.56+' unless 'Net::DNS'->VERSION >= 0.56; 'Net::DNS::Resolver'->new } } || die("cannot create resolver: Net::DNS not available?: $@")
1262 78 109 $self->{'dst_addr'} ||= []
1263 115 72 $self->{'leg'} ||= []
1332 0 0 $self->{'dst_addr'} || (return)
1334 0 0 $self->{'leg'} || (return)
1350 45 43 $self->{'callback'} || (return)

or 3 conditions

line l !l&&r !l&&!r condition
73 55 0 0 $eventloop ||= 'Net::SIP::Dispatcher::Eventloop'->new
84 30 0 0 $port ||= $proto && $proto eq 'tls' ? 5061 : 5060
401 0 71 0 $now ||= time
516 168 0 0 shift() || $self->{'eventloop'}->looptime
545 9 1 0 not defined $min_expire or $next_retransmit < $min_expire
558 60 1 14 not defined $min_expire or $expire < $min_expire
730 0 64 0 $ip_addr ||= $host
748 43 2 36 $addr ||= $$d2p{$dom = '*'}
784 0 71 0 $port || $default_port
843 203 0 0 $_->{'port'} ||= $default_port
953 0 0 0 $self->{'dnsresolv'} || __net_dns_resolver($self->{'eventloop'})
1001 0 0 0 $self->{'dnsresolv'} || __net_dns_resolver($self->{'eventloop'})
1070 0 0 0 $q->{'type'} eq 'AAAA' or $q->{'type'} eq 'A'
1074 0 0 0 $type eq 'A' or $type eq 'AAAA'
1163 0 0 0 $NetDNSResolver ||= eval { do { require Net::DNS; die 'version too old, need 0.56+' unless 'Net::DNS'->VERSION >= 0.56; 'Net::DNS::Resolver'->new } } || die("cannot create resolver: Net::DNS not available?: $@")
1175 0 0 0 $rr->type eq 'A' or $rr->type eq 'AAAA'
1239 109 78 0 $self->{'id'} ||= $self->{'packet'}->tid
1240 0 187 0 $self->{'callid'} ||= $self->{'packet'}->callid
1306 17 72 0 $now ||= time