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 70 0 0 exists $h->{'rport'} and not defined $h->{'rport'}
525 0 10 8 @$retransmits and $retransmits->[0] < $now
589 74 240 0 $leg and @{$qentry->{'leg'};} > 1
594 113 0 201 $dst_addr and $leg
627 103 68 30 $qentry->{'retransmits'} and not $leg->do_retransmits
635 0 88 0 not $error and $qentry->{'retransmits'}
700 120 0 0 $allowed_proto and @$allowed_proto
741 0 39 81 $d2p and %$d2p
757 45 75 0 not @$dst_addr and my $addr = $self->{'outgoing_proxy'}
765 45 0 75 not @$dst_addr and $ip_addr
800 0 116 4 @resp and my $proto = $param->{'transport'}
839 0 0 120 $resp and @$resp
1042 0 0 0 $Net::SIP::Dispatcher::DEBUG and DEBUG_DUMP(100, [$qid, $ans])
1144 0 0 0 @$results && $results
1275 74 63 52 $self->{'leg'}[0] and not $self->{'leg'}[0]->do_retransmits
1287 11 9 19 $p->code > 100 and $p->cseq =~ /\sINVITE$/
1315 240 159 371 $t2 and $to > $t2
1336 0 0 0 @$addr && $addr->[0]

or 2 conditions

line l !l condition
77 27 30 $domain2proxy ||= {}
139 0 0 $self->_find_leg4addr($outgoing_proxy) || die("cannot find leg for destination $outgoing_proxy")
714 120 0 $dst_addr ||= []
715 0 120 $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 83 113 $self->{'dst_addr'} ||= []
1263 122 74 $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 57 0 0 $eventloop ||= 'Net::SIP::Dispatcher::Eventloop'->new
84 30 0 0 $port ||= $proto && $proto eq 'tls' ? 5061 : 5060
401 0 76 0 $now ||= time
516 174 0 0 shift() || $self->{'eventloop'}->looptime
545 9 0 1 not defined $min_expire or $next_retransmit < $min_expire
558 66 2 15 not defined $min_expire or $expire < $min_expire
730 0 68 0 $ip_addr ||= $host
748 43 2 36 $addr ||= $$d2p{$dom = '*'}
784 0 75 0 $port || $default_port
843 211 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 113 83 0 $self->{'id'} ||= $self->{'packet'}->tid
1240 0 196 0 $self->{'callid'} ||= $self->{'packet'}->callid
1306 19 74 0 $now ||= time