[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31061 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31061 - gnunet/src/mesh |
Date: |
Thu, 5 Dec 2013 11:17:09 +0100 |
Author: bartpolot
Date: 2013-12-05 11:17:09 +0100 (Thu, 05 Dec 2013)
New Revision: 31061
Modified:
gnunet/src/mesh/gnunet-service-mesh_channel.c
Log:
- fix procession of channel create in loopback channels
Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-12-05 10:03:28 UTC
(rev 31060)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-12-05 10:17:09 UTC
(rev 31061)
@@ -2008,9 +2008,9 @@
MESH_ChannelNumber chid;
struct MeshChannel *ch;
struct MeshClient *c;
+ int new_channel;
chid = ntohl (msg->chid);
-
ch = GMT_get_channel (t, chid);
if (NULL == ch)
{
@@ -2018,7 +2018,15 @@
ch = channel_new (t, NULL, 0);
ch->gid = chid;
channel_set_options (ch, ntohl (msg->opt));
+ new_channel = GNUNET_YES;
+ }
+ else
+ {
+ new_channel = GNUNET_NO;
+ }
+ if (GNUNET_YES == new_channel || GMT_is_loopback (t))
+ {
/* Find a destination client */
ch->port = ntohl (msg->port);
LOG (GNUNET_ERROR_TYPE_DEBUG, " port %u\n", ch->port);
@@ -2053,7 +2061,10 @@
send_client_create (ch);
ch->state = MESH_CHANNEL_SENT;
}
-
+ else
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " duplicate create channel\n");
+ }
send_ack (ch, GNUNET_YES);
return ch;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31061 - gnunet/src/mesh,
gnunet <=