Skip to content

Commit

Permalink
Skip branch IP checking if no IP defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ctfliblime committed Oct 28, 2011
1 parent 15b263c commit 773fccc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions C4/Branch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ sub GetBranchByIp {

foreach my $branch (values %{GetBranches()}) {
my $library_cidr = $collection->new_list();
next if !$branch->{branchip};
map {$collection->add_range($library_cidr, $_, 0)} split(/\n/, $branch->{branchip});
$collection->process_intersection();
return $branch->{branchcode} if ($collection->get_next_intersection_range());
Expand Down

0 comments on commit 773fccc

Please sign in to comment.