Skip to content
Snippets Groups Projects
Commit 3a36c14d authored by terry-norbraten's avatar terry-norbraten
Browse files

container checking

parent 3f953ba7
No related branches found
No related tags found
No related merge requests found
...@@ -292,15 +292,24 @@ public class DisThreadedNetIF ...@@ -292,15 +292,24 @@ public class DisThreadedNetIF
} catch (IOException e) {} } catch (IOException e) {}
}; };
private void toListeners(Pdu pdu) private void toListeners(Pdu pdu) {
{ if (everyTypeListeners.isEmpty()) {
everyTypeListeners.forEach(lis -> lis.incomingPdu(pdu)); return;
if (pdu != null) { }
List<PduListener> arLis = typeListeners.get(pdu.getPduType());
if (arLis != null) if (pdu != null) {
arLis.forEach(lis -> lis.incomingPdu(pdu)); everyTypeListeners.forEach(lis -> lis.incomingPdu(pdu));
if (typeListeners.isEmpty()) {
return;
}
List<PduListener> arLis = typeListeners.get(pdu.getPduType());
if (arLis != null) {
arLis.forEach(lis -> lis.incomingPdu(pdu));
}
}
} }
}
private void toRawListeners(byte[] data, int len) private void toRawListeners(byte[] data, int len)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment