gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27083 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r27083 - gnunet/src/mesh
Date: Fri, 10 May 2013 10:04:29 +0200

Author: bartpolot
Date: 2013-05-10 10:04:29 +0200 (Fri, 10 May 2013)
New Revision: 27083

Modified:
   gnunet/src/mesh/mesh2_api.c
Log:
- proper memory usage

Modified: gnunet/src/mesh/mesh2_api.c
===================================================================
--- gnunet/src/mesh/mesh2_api.c 2013-05-10 08:03:39 UTC (rev 27082)
+++ gnunet/src/mesh/mesh2_api.c 2013-05-10 08:04:29 UTC (rev 27083)
@@ -869,8 +869,8 @@
   const struct GNUNET_MessageHeader *payload;
   const struct GNUNET_MESH_MessageHandler *handler;
   const struct GNUNET_PeerIdentity *peer;
+  struct GNUNET_PeerIdentity id;
   struct GNUNET_MESH_Unicast *ucast;
-  struct GNUNET_MESH_Multicast *mcast;
   struct GNUNET_MESH_ToOrigin *to_orig;
   struct GNUNET_MESH_Tunnel *t;
   unsigned int i;
@@ -895,7 +895,8 @@
     to_orig = (struct GNUNET_MESH_ToOrigin *) message;
     t = retrieve_tunnel (h, ntohl (to_orig->tid));
     payload = (struct GNUNET_MessageHeader *) &to_orig[1];
-    GNUNET_PEER_resolve (t->peer, &peer);
+    GNUNET_PEER_resolve (t->peer, &id);
+    peer = &id;
     pid = ntohl (to_orig->pid);
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  torig on tunnel %s [%X]\n",
          GNUNET_i2s (peer), ntohl (to_orig->tid));
@@ -1467,6 +1468,7 @@
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
   msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
   msg.tunnel_id = htonl (t->tid);
+  msg.peer = *peer;
   send_packet (h, &msg.header, t);
   return t;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]