aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh_channel.c')
-rw-r--r--src/mesh/gnunet-service-mesh_channel.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c
index be4f7d0c0..d36a6df51 100644
--- a/src/mesh/gnunet-service-mesh_channel.c
+++ b/src/mesh/gnunet-service-mesh_channel.c
@@ -811,7 +811,8 @@ channel_destroy (struct MeshChannel *ch)
811 */ 811 */
812static struct MeshChannel * 812static struct MeshChannel *
813channel_new (struct MeshTunnel3 *t, 813channel_new (struct MeshTunnel3 *t,
814 struct MeshClient *owner, MESH_ChannelNumber lid_root) 814 struct MeshClient *owner,
815 MESH_ChannelNumber lid_root)
815{ 816{
816 struct MeshChannel *ch; 817 struct MeshChannel *ch;
817 818
@@ -880,8 +881,8 @@ handle_loopback (struct MeshChannel *ch,
880 break; 881 break;
881 882
882 case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE: 883 case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE:
883 // FIXME store channel in loopback tunnel? 884 GMCH_handle_create (ch->t,
884 GMCH_handle_create ((struct GNUNET_MESH_ChannelCreate *) msgh, 885 (struct GNUNET_MESH_ChannelCreate *) msgh,
885 fwd); 886 fwd);
886 break; 887 break;
887 888
@@ -1329,8 +1330,7 @@ GMCH_handle_local_create (struct MeshClient *c,
1329 ch->root_rel->ch = ch; 1330 ch->root_rel->ch = ch;
1330 ch->root_rel->expected_delay = MESH_RETRANSMIT_TIME; 1331 ch->root_rel->expected_delay = MESH_RETRANSMIT_TIME;
1331 1332
1332 LOG (GNUNET_ERROR_TYPE_DEBUG, "CREATED CHANNEL %s[%x]:%u (%x)\n", 1333 LOG (GNUNET_ERROR_TYPE_DEBUG, "CREATED CHANNEL %s\n", GMCH_2s (ch));
1333 GMT_2s (t), ch->gid, ch->port, ch->lid_root);
1334 1334
1335 /* Send create channel */ 1335 /* Send create channel */
1336 { 1336 {
@@ -1505,11 +1505,13 @@ GMCH_handle_data_ack (struct MeshChannel *ch,
1505/** 1505/**
1506 * Handler for channel create messages. 1506 * Handler for channel create messages.
1507 * 1507 *
1508 * @param t Tunnel this channel will be in.
1508 * @param msg Message. 1509 * @param msg Message.
1509 * @param fwd Is this FWD traffic? GNUNET_YES : GNUNET_NO; 1510 * @param fwd Is this FWD traffic? GNUNET_YES : GNUNET_NO;
1510 */ 1511 */
1511struct MeshChannel * 1512struct MeshChannel *
1512GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg, 1513GMCH_handle_create (struct MeshTunnel3 *t,
1514 const struct GNUNET_MESH_ChannelCreate *msg,
1513 int fwd) 1515 int fwd)
1514{ 1516{
1515 MESH_ChannelNumber chid; 1517 MESH_ChannelNumber chid;
@@ -1520,7 +1522,7 @@ GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg,
1520 chid = ntohl (msg->chid); 1522 chid = ntohl (msg->chid);
1521 1523
1522 /* Create channel */ 1524 /* Create channel */
1523 ch = channel_new (NULL, NULL, 0); /* FIXME pass t */ 1525 ch = channel_new (t, NULL, 0);
1524 ch->gid = chid; 1526 ch->gid = chid;
1525 channel_set_options (ch, ntohl (msg->opt)); 1527 channel_set_options (ch, ntohl (msg->opt));
1526 1528