summaryrefslogtreecommitdiff
path: root/esds/simulator.py
diff options
context:
space:
mode:
Diffstat (limited to 'esds/simulator.py')
-rw-r--r--esds/simulator.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/esds/simulator.py b/esds/simulator.py
index 30534de..cdc85d3 100644
--- a/esds/simulator.py
+++ b/esds/simulator.py
@@ -331,6 +331,9 @@ class Simulator:
if interface not in self.nodes[dst]["interfaces"]:
self.log("Cannot create communication from node "+str(src)+ " to "+str(dst)+", interface "+interface+" not available on node "+str(dst))
exit(1)
+ elif src==dst:
+ self.log("Cannot create communication from node "+str(src)+ " to "+str(dst)+" on interface "+interface+", receiver node cannot be the sender")
+ exit(1)
self.log("Send "+str(datasize)+" bytes to n"+str(dst)+" on "+interface,node=nsrc)
if not self.nodes[dst]["turned_on"] and receiver_required:
return(False)