aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-08-21 17:48:08 +0000
committerBart Polot <bart@net.in.tum.de>2013-08-21 17:48:08 +0000
commit60ecaf195aea1b6a62d12c60e05ade1f2308e76f (patch)
tree756033972e5d89c6d8bca9679eada55fcd36031d /src
parent00fe328723e84dd434f4d49be5b2e35508206942 (diff)
downloadgnunet-60ecaf195aea1b6a62d12c60e05ade1f2308e76f.tar.gz
gnunet-60ecaf195aea1b6a62d12c60e05ade1f2308e76f.zip
- fix
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh-enc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c
index 510a08d14..2de3822b6 100644
--- a/src/mesh/gnunet-service-mesh-enc.c
+++ b/src/mesh/gnunet-service-mesh-enc.c
@@ -1829,7 +1829,8 @@ send_connection_create (struct MeshConnection *connection)
1829 connection, 1829 connection,
1830 NULL, 1830 NULL,
1831 GNUNET_YES); 1831 GNUNET_YES);
1832 if (MESH_TUNNEL_SEARCHING == t->state || MESH_TUNNEL_NEW == t->state) 1832 if (NULL != t &&
1833 (MESH_TUNNEL_SEARCHING == t->state || MESH_TUNNEL_NEW == t->state))
1833 tunnel_change_state (t, MESH_TUNNEL_WAITING); 1834 tunnel_change_state (t, MESH_TUNNEL_WAITING);
1834 if (MESH_CONNECTION_NEW == connection->state) 1835 if (MESH_CONNECTION_NEW == connection->state)
1835 connection_change_state (connection, MESH_CONNECTION_SENT); 1836 connection_change_state (connection, MESH_CONNECTION_SENT);
@@ -2945,13 +2946,11 @@ connection_change_state (struct MeshConnection* c,
2945 enum MeshConnectionState state) 2946 enum MeshConnectionState state)
2946{ 2947{
2947 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2948 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2948 "Connection %s[%X] state was %s\n", 2949 "Connection %s state was %s\n",
2949 peer2s (c->t->peer), c->id, 2950 GNUNET_h2s (&c->id), GNUNET_MESH_DEBUG_CS2S (c->state));
2950 GNUNET_MESH_DEBUG_CS2S (c->state));
2951 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2951 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2952 "Connection %s[%X] state is now %s\n", 2952 "Connection %s state is now %s\n",
2953 peer2s (c->t->peer), c->id, 2953 GNUNET_h2s (&c->id), GNUNET_MESH_DEBUG_CS2S (state));
2954 GNUNET_MESH_DEBUG_CS2S (state));
2955 c->state = state; 2954 c->state = state;
2956} 2955}
2957 2956
@@ -4013,6 +4012,8 @@ connection_new (const struct GNUNET_HashCode *cid)
4013 4012
4014 c = GNUNET_new (struct MeshConnection); 4013 c = GNUNET_new (struct MeshConnection);
4015 c->id = *cid; 4014 c->id = *cid;
4015 GNUNET_CONTAINER_multihashmap_put (connections, &c->id, c,
4016 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
4016 fc_init (&c->fwd_fc); 4017 fc_init (&c->fwd_fc);
4017 fc_init (&c->bck_fc); 4018 fc_init (&c->bck_fc);
4018 c->fwd_fc.c = c; 4019 c->fwd_fc.c = c;
@@ -5158,7 +5159,7 @@ handle_mesh_connection_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
5158 5159
5159 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received a connection ACK msg\n"); 5160 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received a connection ACK msg\n");
5160 msg = (struct GNUNET_MESH_ConnectionACK *) message; 5161 msg = (struct GNUNET_MESH_ConnectionACK *) message;
5161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " on connection %s[%X]\n", 5162 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " on connection %s\n",
5162 GNUNET_h2s (&msg->cid)); 5163 GNUNET_h2s (&msg->cid));
5163 c = connection_get (&msg->cid); 5164 c = connection_get (&msg->cid);
5164 if (NULL == c) 5165 if (NULL == c)
@@ -6884,7 +6885,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
6884 dht_replication_level = 3; 6885 dht_replication_level = 3;
6885 } 6886 }
6886 6887
6887 connections = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO); 6888 connections = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_YES);
6888 peers = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO); 6889 peers = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO);
6889 ports = GNUNET_CONTAINER_multihashmap32_create (32); 6890 ports = GNUNET_CONTAINER_multihashmap32_create (32);
6890 6891