Do not send to origin in second buffered multicast path.

This commit is contained in:
Adam Ierymenko 2018-01-26 21:22:51 -05:00
parent d3d58ba8a7
commit 939ab43ceb
2 changed files with 13 additions and 0 deletions

View File

@ -345,6 +345,9 @@ void Multicaster::send(
data, data,
len); len);
if (origin)
out.logAsSent(origin);
unsigned int count = 0; unsigned int count = 0;
for(unsigned int i=0;i<activeBridgeCount;++i) { for(unsigned int i=0;i<activeBridgeCount;++i) {

View File

@ -125,6 +125,16 @@ public:
sendOnly(RR,tPtr,toAddr); sendOnly(RR,tPtr,toAddr);
} }
/**
* 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 * Try to send this to a given peer if it hasn't been sent to them already
* *