Change in mesh API: data callback no longer provides sender, user must remember tunne...
authorBart Polot <bart@net.in.tum.de>
Wed, 19 Jun 2013 11:50:50 +0000 (11:50 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 19 Jun 2013 11:50:50 +0000 (11:50 +0000)
src/fs/gnunet-service-fs_mesh.c
src/include/gnunet_mesh2_service.h
src/mesh/mesh2_api.c

index e25f011ea68c8c51e7255dddc713baf99736d5cf..10b29fa844aa6d1406ecfda66d96264426638466 100644 (file)
@@ -647,7 +647,8 @@ handle_reply (void *cls,
  * complete reply is received.
  *
  * @param cls closure with the 'struct StreamHandle'
- * @param client identification of the client, NULL
+ * @param tunnel tunnel handle
+ * @param tunnel_ctx tunnel context
  * @param message the actual message
  * @return GNUNET_OK on success, GNUNET_SYSERR to stop further processing
  */
@@ -655,8 +656,7 @@ static int
 reply_cb (void *cls,
          struct GNUNET_MESH_Tunnel *tunnel,
          void **tunnel_ctx,
-         const struct GNUNET_PeerIdentity *sender,
-         const struct GNUNET_MessageHeader *message)
+          const struct GNUNET_MessageHeader *message)
 {
   struct StreamHandle *sh = *tunnel_ctx;
   const struct StreamReplyMessage *srm;
@@ -1080,7 +1080,8 @@ handle_datastore_reply (void *cls,
  * Do not call GNUNET_SERVER_mst_destroy in callback
  *
  * @param cls closure with the 'struct StreamClient'
- * @param client identification of the client, NULL
+ * @param tunnel tunnel handle
+ * @param tunnel_ctx tunnel context
  * @param message the actual message
  * @return GNUNET_OK on success, GNUNET_SYSERR to stop further processing
  */
@@ -1088,7 +1089,6 @@ static int
 request_cb (void *cls,
            struct GNUNET_MESH_Tunnel *tunnel,
            void **tunnel_ctx,
-           const struct GNUNET_PeerIdentity *sender,
            const struct GNUNET_MessageHeader *message)
 {
   struct StreamClient *sc = *tunnel_ctx;
index b6593cf9998bdad28e43f6056b613c8946ecd43b..019dc8431f848188606485d171878c4deabb26fb 100644 (file)
@@ -70,7 +70,6 @@ struct GNUNET_MESH_Tunnel;
  * @param cls Closure (set from GNUNET_MESH_connect).
  * @param tunnel Connection to the other end.
  * @param tunnel_ctx Place to store local state associated with the tunnel.
- * @param sender Peer who sent the message.
  * @param message The actual message.
  * 
  * @return GNUNET_OK to keep the tunnel open,
@@ -79,7 +78,6 @@ struct GNUNET_MESH_Tunnel;
 typedef int (*GNUNET_MESH_MessageCallback) (void *cls,
                                             struct GNUNET_MESH_Tunnel *tunnel,
                                             void **tunnel_ctx,
-                                            const struct GNUNET_PeerIdentity *sender,
                                             const struct GNUNET_MessageHeader *message);
 
 
index 11ff743ca8d9fb7bf63be3ca61a7f3591092bce9..40b978fedf87506d499d2219fafe753cdd9922b6 100644 (file)
@@ -951,7 +951,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
     if (handler->type == type)
     {
       if (GNUNET_OK !=
-          handler->callback (h->cls, t, &t->ctx, peer, payload))
+          handler->callback (h->cls, t, &t->ctx, payload))
       {
         LOG (GNUNET_ERROR_TYPE_DEBUG, "callback caused disconnection\n");
         GNUNET_MESH_tunnel_destroy (t);