local multicast revised for multiple NIF (server side only)

This commit is contained in:
Matej Sekoranja
2015-12-31 11:18:49 +01:00
parent 52161dff60
commit 63a0c71fe9
7 changed files with 227 additions and 42 deletions
+4 -4
View File
@@ -263,10 +263,10 @@ void ServerSearchHandler::handleResponse(osiSockAddr* responseFrom,
//
// locally broadcast if unicast (qosCode & 0x80 == 0x80)
//
if (0)
if ((qosCode & 0x80) == 0x80)
{
BlockingUDPTransport::shared_pointer bt = _context->getLocalMulticastTransport();
if (bt)
BlockingUDPTransport::shared_pointer bt = _context->getBroadcastTransport();
if (bt && bt->hasLocalMulticastAddress())
{
// clear unicast flag
payloadBuffer->put(startPosition+4, (int8)(qosCode & ~0x80));
@@ -277,7 +277,7 @@ void ServerSearchHandler::handleResponse(osiSockAddr* responseFrom,
payloadBuffer->setPosition(payloadBuffer->getLimit()); // send will call flip()
bt->send(payloadBuffer);
bt->send(payloadBuffer, bt->getLocalMulticastAddress());
return;
}
}