Minor send path refactor to make packet I/O work on clusters if they are members of networks. Also fix a crash if compiled in cluster mode but no cluster is enabled.

This commit is contained in:
Adam Ierymenko 2017-02-01 12:00:25 -08:00
parent 6d5a3cd2e2
commit 5dbebc513a
5 changed files with 278 additions and 115 deletions

View file

@ -974,7 +974,7 @@ uint64_t Network::handleConfigChunk(const uint64_t packetId,const Address &sourc
}
#ifdef ZT_ENABLE_CLUSTER
if (source)
if ((source)&&(RR->cluster))
RR->cluster->broadcastNetworkConfigChunk(chunk.field(start,chunk.size() - start),chunk.size() - start);
#endif
@ -1007,7 +1007,7 @@ uint64_t Network::handleConfigChunk(const uint64_t packetId,const Address &sourc
}
#ifdef ZT_ENABLE_CLUSTER
if (source)
if ((source)&&(RR->cluster))
RR->cluster->broadcastNetworkConfigChunk(chunk.field(start,chunk.size() - start),chunk.size() - start);
#endif
} else {