浏览代码

debugging switch script

cecylia 8 年之前
父节点
当前提交
3ce4d07955
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      js/devicescripts.js

+ 3 - 1
js/devicescripts.js

@@ -79,7 +79,9 @@ var deviceScripts = {
             if(!found){
                 //broadcast packet to all ports except where it was received
                 for(var i=0; i<device.ports.length; i++){
-                    sendPacket(device.id, i, packet);
+                    if(i != portNum){
+                        sendPacket(device.id, i, packet);
+                    }
                 }
             }
             //update rules with info from this packet