- Wrong order of function calling, caused notifing of destruction when ignoring.
authorBart Polot <bart@net.in.tum.de>
Wed, 25 Apr 2012 00:15:46 +0000 (00:15 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 25 Apr 2012 00:15:46 +0000 (00:15 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/mesh_api.c

index 86fb48609f344aecf9ab301c125bbfb7b4c2fb94..9f1b7b491c1c94d10787c5355af9c4fe19693e3d 100644 (file)
@@ -4025,7 +4025,6 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client,
     GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
     return;
   }
-  send_client_tunnel_disconnect(t, c);
   if (c != t->owner || tid >= GNUNET_MESH_LOCAL_TUNNEL_ID_SERV)
   {
     client_ignore_tunnel (c, t);
@@ -4045,6 +4044,7 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client,
     GNUNET_SERVER_receive_done (client, GNUNET_OK);
     return;
   }
+  send_client_tunnel_disconnect(t, c);
   client_delete_tunnel(c, t);
 
   /* Don't try to ACK the client about the tunnel_destroy multicast packet */
index a4f4978292dec4d4245147a9e64d801ecb35aebf..cf9b1c81226150dac349b7e075fd683a896e8cca 100644 (file)
@@ -865,7 +865,7 @@ process_tunnel_destroy (struct GNUNET_MESH_Handle *h,
   {
     GNUNET_break (0);
   }
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "tunnel %u destroyed\n", t->tid);
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "tunnel %X destroyed\n", t->tid);
   destroy_tunnel (t, GNUNET_YES);
   return;
 }