fix to use correct queue
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 23 Feb 2012 10:18:47 +0000 (10:18 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 23 Feb 2012 10:18:47 +0000 (10:18 +0000)
src/transport/plugin_transport_udp.c

index 89c412b08398f74dea3de84bdcfe27658a5a0600..8b557c52c7c7ae959f03cfe0b06b32f730b4b237 100644 (file)
@@ -1552,12 +1552,17 @@ udp_select_send (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *sock)
       }
 
       if (sock == plugin->sockv4)
+      {
         GNUNET_CONTAINER_DLL_remove(plugin->ipv4_queue_head, plugin->ipv4_queue_tail, udpw);
+        GNUNET_free (udpw);
+        udpw = plugin->ipv4_queue_head;
+      }
       else if (sock == plugin->sockv6)
+      {
         GNUNET_CONTAINER_DLL_remove(plugin->ipv6_queue_head, plugin->ipv6_queue_tail, udpw);
-
-      GNUNET_free (udpw);
-      udpw = plugin->ipv4_queue_head;
+        GNUNET_free (udpw);
+        udpw = plugin->ipv6_queue_head;
+      }
     }
     else
     {