diff options
Diffstat (limited to 'node')
-rw-r--r-- | node/Multicaster.cpp | 3 | ||||
-rw-r--r-- | node/OutboundMulticast.hpp | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index c5cf456b..9845c6cd 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -345,6 +345,9 @@ void Multicaster::send( data, len); + if (origin) + out.logAsSent(origin); + unsigned int count = 0; for(unsigned int i=0;i<activeBridgeCount;++i) { diff --git a/node/OutboundMulticast.hpp b/node/OutboundMulticast.hpp index 836b840b..a735f52b 100644 --- a/node/OutboundMulticast.hpp +++ b/node/OutboundMulticast.hpp @@ -126,6 +126,16 @@ public: } /** + * Log an address as having been used so we will not send there in the future + * + * @param toAddr Address to log as sent + */ + inline void logAsSent(const Address &toAddr) + { + _alreadySentTo.push_back(toAddr); + } + + /** * Try to send this to a given peer if it hasn't been sent to them already * * @param RR Runtime environment |