[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30892 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30892 - gnunet/src/mesh |
Date: |
Wed, 27 Nov 2013 06:08:55 +0100 |
Author: bartpolot
Date: 2013-11-27 06:08:55 +0100 (Wed, 27 Nov 2013)
New Revision: 30892
Modified:
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_peer.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
Log:
- fix consensus profiler test (multiple channels reusing same tunnel/session)
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-11-27 04:44:27 UTC
(rev 30891)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-11-27 05:08:55 UTC
(rev 30892)
@@ -2270,7 +2270,9 @@
const struct MeshPeerPath *
GMC_get_path (const struct MeshConnection *c)
{
- return c->path;
+ if (GNUNET_NO == c->destroy)
+ return c->path;
+ return NULL;
}
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-11-27 04:44:27 UTC (rev
30891)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-11-27 05:08:55 UTC (rev
30892)
@@ -1336,6 +1336,11 @@
return;
}
}
+ else
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "but is NULL!!\n");
+ GNUNET_break (0);
+ }
}
if (NULL != peer->search_h && GNUNET_YES == rerun_search)
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-11-27 04:44:27 UTC
(rev 30891)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-11-27 05:08:55 UTC
(rev 30892)
@@ -1642,6 +1642,12 @@
aux->ch = ch;
LOG (GNUNET_ERROR_TYPE_DEBUG, " adding %p to %p\n", aux, t->channel_head);
GNUNET_CONTAINER_DLL_insert_tail (t->channel_head, t->channel_tail, aux);
+
+ if (GNUNET_YES == t->destroy)
+ {
+ t->destroy = GNUNET_NO;
+ LOG (GNUNET_ERROR_TYPE_DEBUG, " undo destroy!\n");
+ }
}
@@ -2274,6 +2280,7 @@
const struct MeshPeerPath *path)
{
struct MeshTConnection *iter;
+ const struct MeshPeerPath *aux;
unsigned int overlap;
unsigned int i;
unsigned int j;
@@ -2288,9 +2295,13 @@
{
for (iter = t->connection_head; NULL != iter; iter = iter->next)
{
- for (j = 0; j < GMC_get_path (iter->c)->length; j++)
+ aux = GMC_get_path (iter->c);
+ if (NULL == aux)
+ continue;
+
+ for (j = 0; j < aux->length; j++)
{
- if (path->peers[i] == GMC_get_path (iter->c)->peers[j])
+ if (path->peers[i] == aux->peers[j])
{
overlap++;
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30892 - gnunet/src/mesh,
gnunet <=