gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r16904 - gnunet/src/mesh
Date: Fri, 16 Sep 2011 20:10:24 +0200

Author: bartpolot
Date: 2011-09-16 20:10:24 +0200 (Fri, 16 Sep 2011)
New Revision: 16904

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed send data to origin to work with the new data structures


Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2011-09-16 18:08:53 UTC (rev 
16903)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2011-09-16 18:10:24 UTC (rev 
16904)
@@ -2099,8 +2099,6 @@
  * @param atsi performance data
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
- *
- * FIXME path
  */
 static int
 handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -2109,14 +2107,14 @@
 {  
   struct GNUNET_MESH_ToOrigin *msg;
   struct GNUNET_PeerIdentity id;
-  struct MeshTunnel *t;
   struct MeshPeerInfo *peer_info;
+  struct MeshTunnel *t;
   size_t size;
 
   size = ntohs (message->size);
   if (size <
       sizeof (struct GNUNET_MESH_ToOrigin) +
-      sizeof (struct GNUNET_MessageHeader))
+      sizeof (struct GNUNET_MessageHeader)) /* Payload >= header */
   {
     GNUNET_break_op (0);
     return GNUNET_OK;
@@ -2138,6 +2136,7 @@
       GNUNET_break_op (0);
       return GNUNET_OK;
     }
+    /* TODO signature verification */
     GNUNET_SERVER_notification_context_unicast (nc, t->client->handle, message,
                                                 GNUNET_YES);
     return GNUNET_OK;
@@ -2149,7 +2148,7 @@
     GNUNET_break (0);
     return GNUNET_OK;
   }
-  GNUNET_PEER_resolve (path_get_first_hop (t, peer_info)->id, &id);
+  GNUNET_PEER_resolve (t->paths->me->parent->peer->id, &id);
   msg = GNUNET_malloc (size);
   memcpy (msg, message, size);
   GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,




reply via email to

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