Skip to content

Commit

Permalink
Fix Edge Case P2P Type Changing
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Dec 29, 2024
1 parent bce0f01 commit d6d7ebe
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ private void properlyChangeAllP2PTypes(P2PLocation p2p, TunnelInfo newType, Call
}

if (tunnel.getFrequency() == 0) {
// Unbound or Inactive
// Can't rebind same frequency if inactive, as not registered in ae2 handling
// Unbound
// Just change this P2P
var result = changeP2PType(tunnel, newType);
cir.setReturnValue(result != null);
return;
Expand All @@ -98,6 +98,10 @@ private void properlyChangeAllP2PTypes(P2PLocation p2p, TunnelInfo newType, Call
inputs.forEach(toModify::add);
outputs.forEach(toModify::add);

// Bound P2Ps, to a frequency with no other P2Ps
if (toModify.isEmpty())
toModify.add(tunnel);

for (var modify : toModify) {
var result = changeP2PType(modify, newType);
if (result == null) {
Expand Down

0 comments on commit d6d7ebe

Please sign in to comment.