Condition Coverage

blib/lib/Net/SIP/Leg.pm
Criterion Covered Total %
condition 53 118 44.9


and 3 conditions

line !l l&&!r l&&r condition
69 102 1 38 $proto && $proto eq 'tls'
79 3 1 0 $port and $port_a
4 0 0 $port and $port_a and $port != $port_a
93 141 0 0 $dst and not ref $dst
106 3 138 0 $sock and $socketpool
107 3 0 0 $socketpool && $socketpool->master
168 0 138 0 not $dst and my $saddr = getpeername $sock
339 0 0 7 ($rr) = $packet->get_header('record-route') and sip_uri_eq($rr, $self->{'contact'})
395 115 0 74 !$isrq && $packet->code
396 91 40 58 $method eq 'INVITE' and $isrq || $code =~ /^2/
73 58 0 not $isrq and $code == 405 || $method eq 'OPTIONS' && $code =~ /^2/
403 131 0 58 $need_contact and not my(@a) = $packet->get_header('contact')
416 130 0 59 $need_allow and not my(@a) = $packet->get_header('allow')
420 130 0 59 $need_supported and not my(@a) = $packet->get_header('supported')
426 0 189 0 exists $dst->{'proto'} and $dst->{'proto'} ne $self->{'proto'}
567 0 110 81 $spec{'proto'} and $spec{'proto'} ne $self->{'proto'}
569 0 0 110 $spec{'family'} and $self->{'src'}
0 110 0 $spec{'family'} and $self->{'src'} and $self->{'src'}{'family'} != $spec{'family'}
589 0 0 2 $args->{'addr'} and $args->{'addr'} ne $self->{'src'}{'addr'}
0 0 2 $args->{'addr'} and $args->{'addr'} ne $self->{'src'}{'addr'} and $args->{'addr'} ne $self->{'src'}{'host'}
590 0 0 0 $args->{'port'} and $args->{'port'} != $self->{'src'}{'port'}
591 0 0 0 $args->{'proto'} and $args->{'proto'} ne $self->{'proto'}
592 0 0 0 $args->{'sub'} and not invoke_callback($args->{'sub'}, $self)

or 2 conditions

line l !l condition
67 0 38 $proto ||= 'tls'
112 0 3 $proto ||= 'udp'

or 3 conditions

line l !l&&r !l&&!r condition
85 0 4 0 $host || $addr
107 138 0 3 $sock ||= $socketpool && $socketpool->master
124 0 0 0 $host || $srcip
135 0 0 3 $proto eq 'tcp' or $proto eq 'tls'
141 0 0 0 $dst->{'port'} ||= $default_port
154 0 3 0 $src->{'port'} ||= $sock->sockport
159 39 99 0 $proto ||= $sock->socktype == 2 ? 'udp' : 'tcp'
175 0 141 0 $socketpool ||= 'Net::SIP::SocketPool'->new($proto, $sock, $dst, $sockpeer, $tls)
183 0 141 0 delete $args{'contact'} || "${sip_proto}:$leg_addr"
187 0 141 0 delete $args{'branch'} || md5_hex(@{$$self{'src'};}{'addr', 'port'}, $proto)
241 6 0 1 not $maxf or $maxf > 70
396 42 16 40 $isrq || $code =~ /^2/
1 0 57 $code == 405 || $method eq 'OPTIONS' && $code =~ /^2/
427 189 0 0 $dst->{'port'} ||= $self->{'proto'} eq 'tls' ? 5061 : 5060
535 8 0 0 $param && $param->{'branch'} || $via