- address FIXMEs
authorBart Polot <bart@net.in.tum.de>
Fri, 11 Oct 2013 16:30:09 +0000 (16:30 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 11 Oct 2013 16:30:09 +0000 (16:30 +0000)
src/mesh/gnunet-service-mesh_channel.c
src/mesh/gnunet-service-mesh_channel.h
src/mesh/gnunet-service-mesh_local.c
src/mesh/gnunet-service-mesh_tunnel.c

index be4f7d0c071bdd751169fadbf5b9e84edd630fa3..d36a6df51022615ea059a1e0650e4ee145f1dbb5 100644 (file)
@@ -811,7 +811,8 @@ channel_destroy (struct MeshChannel *ch)
  */
 static struct MeshChannel *
 channel_new (struct MeshTunnel3 *t,
-             struct MeshClient *owner, MESH_ChannelNumber lid_root)
+             struct MeshClient *owner,
+             MESH_ChannelNumber lid_root)
 {
   struct MeshChannel *ch;
 
@@ -880,8 +881,8 @@ handle_loopback (struct MeshChannel *ch,
       break;
 
     case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE:
-       // FIXME store channel in loopback tunnel?
-      GMCH_handle_create ((struct GNUNET_MESH_ChannelCreate *) msgh,
+      GMCH_handle_create (ch->t,
+                          (struct GNUNET_MESH_ChannelCreate *) msgh,
                           fwd);
       break;
 
@@ -1329,8 +1330,7 @@ GMCH_handle_local_create (struct MeshClient *c,
   ch->root_rel->ch = ch;
   ch->root_rel->expected_delay = MESH_RETRANSMIT_TIME;
 
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "CREATED CHANNEL %s[%x]:%u (%x)\n",
-       GMT_2s (t), ch->gid, ch->port, ch->lid_root);
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "CREATED CHANNEL %s\n", GMCH_2s (ch));
 
   /* Send create channel */
   {
@@ -1505,11 +1505,13 @@ GMCH_handle_data_ack (struct MeshChannel *ch,
 /**
  * Handler for channel create messages.
  *
+ * @param t Tunnel this channel will be in.
  * @param msg Message.
  * @param fwd Is this FWD traffic? GNUNET_YES : GNUNET_NO;
  */
 struct MeshChannel *
-GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg,
+GMCH_handle_create (struct MeshTunnel3 *t,
+                    const struct GNUNET_MESH_ChannelCreate *msg,
                     int fwd)
 {
   MESH_ChannelNumber chid;
@@ -1520,7 +1522,7 @@ GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg,
   chid = ntohl (msg->chid);
 
   /* Create channel */
-  ch = channel_new (NULL, NULL, 0); /* FIXME pass t */
+  ch = channel_new (t, NULL, 0);
   ch->gid = chid;
   channel_set_options (ch, ntohl (msg->opt));
 
index c6dbc7835826f990b6881c3d208d4b796897ef42..82d85e5bed41583e08edd22f4818f10aa3c702c0 100644 (file)
@@ -238,12 +238,13 @@ GMCH_handle_data_ack (struct MeshChannel *ch,
 /**
  * Handler for channel create messages.
  *
- * @param t Tunnel this channel is to be created in.
+ * @param t Tunnel this channel will be in.
  * @param msg Message.
  * @param fwd Is this FWD traffic? GNUNET_YES : GNUNET_NO;
  */
 struct MeshChannel *
-GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg,
+GMCH_handle_create (struct MeshTunnel3 *t,
+                    const struct GNUNET_MESH_ChannelCreate *msg,
                     int fwd);
 
 /**
index b3c560034cdc6cc6f633e6fe8ecc87d01690c72a..67d4690e5686aa4d39d249c6805853f057e6d33d 100644 (file)
@@ -179,6 +179,7 @@ handle_client_connect (void *cls, struct GNUNET_SERVER_Client *client)
 {
   struct MeshClient *c;
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "client connected: %p\n", client);
   if (NULL == client)
     return;
   c = GNUNET_new (struct MeshClient);
index bb6ce63d8f450f98c2adecf620d171cdbbe52d9d..3f338ac3f7098ce41445d9299ba3421329bcf561 100644 (file)
@@ -392,7 +392,7 @@ handle_ch_create (struct MeshTunnel3 *t,
   }
   else
   {
-    ch = GMCH_handle_create (msg, fwd);
+    ch = GMCH_handle_create (t, msg, fwd);
   }
 
   tch = GNUNET_new (struct MeshTChannel);