m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu
diff options
context:
space:
mode:
authorMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-06 16:32:45 +0100
committerMagdalena Grodzińska <mag.grodzinska@gmail.com>2020-01-06 16:32:45 +0100
commit6027e8ffcc91495dc1cfe76da925e846f57646e7 (patch)
tree2db194e3123a3dc9c570c1c8e8220902d51da853 /src/main/java/pl/edu
parentf8e0f371515a825ead0bf385105b461223c55e71 (diff)
Fix passing messages in server
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/UDUPServer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/UDUPServer.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/UDUPServer.java
index 9a64bbd..6807a86 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/UDUPServer.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/UDUPServer.java
@@ -37,7 +37,9 @@ public class UDUPServer {
if (packet.getLength() == this.bufSize) {
this.addPartialMessageAndCheckSerialization(packet.getAddress(), packet.getData());
} else {
- if (msg.getDestinationModule() != ModuleType.UDP) {
+ if (msg.getContent().getDestinationModule() == ModuleType.TEST) {
+ System.out.println("UDP server: test message received");
+ } else if (msg.getContent().getDestinationModule() != ModuleType.UDP) {
this.udp.sendMessage(msg.getContent());
}
}