Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
juansalinas-xyz committed Nov 28, 2015
1 parent da09d71 commit 6e014ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Entities/Equipment/Router.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ private Integer getNextKey(){
private boolean packetReceived(Packet packet){
boolean received = false;
for (Equipment equipment : equipments) {
for (Equipment e : equipment.equipments) {
if(e.getAssociatedIp().equals(packet.getDestination())){
if(equipment.getAssociatedIp().equals(packet.getDestination())){
received = true;
break;
}
}

}
return received;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Equipment/Terminal.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void receivePacket(Packet packet) {

@Override
public void sendPacket(Packet packet) {
if (equipments != null && equipments.size() > 0) {
if (equipments != null && !equipments.isEmpty()) {
for (Equipment equipment : equipments) {
equipment.receivePacket(packet);
}
Expand Down

0 comments on commit 6e014ea

Please sign in to comment.