gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r30165 - gnunet/src/mesh
Date: Fri, 11 Oct 2013 18:30:09 +0200

Author: bartpolot
Date: 2013-10-11 18:30:09 +0200 (Fri, 11 Oct 2013)
New Revision: 30165

Modified:
   gnunet/src/mesh/gnunet-service-mesh_channel.c
   gnunet/src/mesh/gnunet-service-mesh_channel.h
   gnunet/src/mesh/gnunet-service-mesh_local.c
   gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- address FIXMEs


Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-10-11 16:29:47 UTC 
(rev 30164)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c       2013-10-11 16:30:09 UTC 
(rev 30165)
@@ -811,7 +811,8 @@
  */
 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 @@
       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 @@
   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 @@
 /**
  * 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 @@
   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));
 

Modified: gnunet/src/mesh/gnunet-service-mesh_channel.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.h       2013-10-11 16:29:47 UTC 
(rev 30164)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.h       2013-10-11 16:30:09 UTC 
(rev 30165)
@@ -238,12 +238,13 @@
 /**
  * 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);
 
 /**

Modified: gnunet/src/mesh/gnunet-service-mesh_local.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_local.c 2013-10-11 16:29:47 UTC (rev 
30164)
+++ gnunet/src/mesh/gnunet-service-mesh_local.c 2013-10-11 16:30:09 UTC (rev 
30165)
@@ -179,6 +179,7 @@
 {
   struct MeshClient *c;
 
+  LOG (GNUNET_ERROR_TYPE_DEBUG, "client connected: %p\n", client);
   if (NULL == client)
     return;
   c = GNUNET_new (struct MeshClient);

Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2013-10-11 16:29:47 UTC 
(rev 30164)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c        2013-10-11 16:30:09 UTC 
(rev 30165)
@@ -392,7 +392,7 @@
   }
   else
   {
-    ch = GMCH_handle_create (msg, fwd);
+    ch = GMCH_handle_create (t, msg, fwd);
   }
 
   tch = GNUNET_new (struct MeshTChannel);




reply via email to

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