瀏覽代碼

Fix MULTICAST_GATHER reply problem in root

Adam Ierymenko 6 年之前
父節點
當前提交
4c08ac7873
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      root/root.cpp

+ 4 - 2
root/root.cpp

@@ -351,9 +351,11 @@ static void handlePacket(const int v4s,const int v6s,const InetAddress *const ip
 									pkt.addSize(2);
 
 									unsigned int l = 0;
-									for(auto g=forGroup->second.begin();((l<gatherLimit)&&(g!=forGroup->second.end()));++l,++g) {
-										if (g->first != source)
+									for(auto g=forGroup->second.begin();((l<gatherLimit)&&(g!=forGroup->second.end()));++g) {
+										if (g->first != source) {
+											++l;
 											g->first.appendTo(pkt);
+										}
 									}
 
 									if (l > 0) {