- initialized all fields of mesh's tunnel destroy message
authorFlorian Dold <florian.dold@gmail.com>
Tue, 9 Jul 2013 21:03:52 +0000 (21:03 +0000)
committerFlorian Dold <florian.dold@gmail.com>
Tue, 9 Jul 2013 21:03:52 +0000 (21:03 +0000)
src/mesh/mesh_api.c

index b9f6bf9c2645f6998a62343928165ac338d071ee..36ddbf022e454c2af34b88c31ecbcc35aa828e13 100644 (file)
@@ -856,6 +856,9 @@ process_tunnel_created (struct GNUNET_MESH_Handle *h,
     d_msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY);
     d_msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
     d_msg.tunnel_id = msg->tunnel_id;
+    memset (&d_msg.peer, 0, sizeof (struct GNUNET_PeerIdentity));
+    d_msg.port = 0;
+    d_msg.options = 0;
 
     send_packet (h, &d_msg.header, NULL);
   }
@@ -1506,6 +1509,9 @@ GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tunnel)
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY);
   msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
   msg.tunnel_id = htonl (tunnel->tid);
+  memset (&msg.peer, 0, sizeof (struct GNUNET_PeerIdentity));
+  msg.port = 0;
+  msg.options = 0;
   th = h->th_head;
   while (th != NULL)
   {