Branch Coverage

blib/lib/Net/SIP/NATHelper/Base.pm
Criterion Covered Total %
branch 0 118 0.0


line true false branch
138 0 0 unless ($call)
163 0 0 unless ($call)
198 0 0 if ($call->is_empty)
275 0 0 if (my $max = $self->{'max_sockets_in_group'})
276 0 0 if ($need_sockets > $max)
283 0 0 if (my $max = $self->{'max_sockets'})
284 0 0 if ($self->{'socket_count'} + $need_sockets > $max)
295 0 0 unless (@socks)
300 0 0 if (not $port or $addr eq '0.0.0.0' or $addr eq '::') { }
375 0 0 unless ($data)
377 0 0 if ($cseq_data)
379 0 0 if ($_ > $cseq)
401 0 0 if ($side == 0) { }
404 0 0 unless 'Net::SIP::NATHelper::SocketGroup'->new($nathelper, $idfrom, $addr, $media)
410 0 0 unless 'Net::SIP::NATHelper::SocketGroup'->new($nathelper, $idto, $addr, $media)
429 0 0 unless ($data)
435 0 0 if (my $sess = $sessions->{$idto})
442 0 0 unless ($gfrom and $gto)
485 0 0 if ($cseq) { }
489 0 0 if (my $sess = $data && delete $data->{'sessions'}{$idto}) { }
495 0 0 if ($data and not %{$data->{'sessions'};})
512 0 0 if (my $sess = delete $data->{'sessions'}{$to})
516 0 0 unless (%{$data->{'sessions'};})
523 0 0 if @del_cseq
525 0 0 unless (@info)
546 0 0 $args{'unused'} ? :
547 0 0 $args{'active'} ? :
548 0 0 $args{'closed'} ? :
550 0 0 unless $self->{'expired'}
570 0 0 if ($lastmod < $expire_active) { }
0 0 elsif (my $created = &max($active_pairs{"$idfrom\000$idto"} || 0, $active_pairs{"$idto\000$idfrom"} || 0)) { }
579 0 0 if ($created > $sess->{'created'}) { }
0 0 elsif ($created < $sess->{'created'}) { }
609 0 0 if $data->{'socket_group_from'}
611 0 0 if $used{$v}
613 0 0 if (not $lastmod) { }
0 0 elsif ($lastmod < $expire_closed) { }
615 0 0 if ($v->{'created'} < $expire_unused)
626 0 0 if %expired_sg and delete $expired_sg{$data->{'socket_group_from'}}
627 0 0 if (%expired_sg)
629 0 0 if delete $expired_sg{$groups->{$id}}
630 0 0 unless %expired_sg
637 0 0 unless $need_next_pass
656 0 0 unless (%{$data->{'socket_groups_to'};} or $data->{'socket_group_from'})
661 0 0 unless (%$by_cseq)
666 0 0 %$by_from ? :
721 0 0 if $sf
766 0 0 if (@{$sfrom->get_socks;} != @{$sto->get_socks;})
844 0 0 if $callbacks
879 0 0 if $dstaddr
893 0 0 if $recvaddr
913 0 0 if (not $$bytes) { }
0 0 elsif ($$rfrom and $peer ne $$rfrom) { }
914 0 0 if ($peer eq $$rfrom) { }
917 0 0 if connect $read_socket, $peer
932 0 0 if ($$rto) { }
933 0 0 unless (send $write_socket, $buf, 0, $$rto)
942 0 0 unless (send $write_socket, $buf, 0)
990 0 0 unless my $new_media = $nathelper->get_rtp_sockets($new_addr, $media)