]> git.proxmox.com Git - qemu.git/blobdiff - net/hub.c
misc: move include files to include/qemu/
[qemu.git] / net / hub.c
index ac157e32eed371181a670fea6f0bfb660f020aab..5adfce444beb4385af4ef2fede11eefee9a47500 100644 (file)
--- a/net/hub.c
+++ b/net/hub.c
  *
  */
 
-#include "monitor.h"
-#include "net.h"
+#include "monitor/monitor.h"
+#include "net/net.h"
+#include "clients.h"
 #include "hub.h"
-#include "iov.h"
+#include "qemu/iov.h"
 
 /*
  * A hub broadcasts incoming packets to all its ports except the source port.
@@ -97,12 +98,12 @@ static int net_hub_port_can_receive(NetClientState *nc)
             continue;
         }
 
-        if (!qemu_can_send_packet(&port->nc)) {
-            return 0;
+        if (qemu_can_send_packet(&port->nc)) {
+            return 1;
         }
     }
 
-    return 1;
+    return 0;
 }
 
 static ssize_t net_hub_port_receive(NetClientState *nc,