diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-02-14 10:13:19 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-02-14 10:13:19 +0000 |
commit | 14f550369b00aea7e368d1d5f707df85925103b6 (patch) | |
tree | fefe5985bd5478077d34da37a1998a563b1b00b5 /src/mesh | |
parent | bb86330651d56cfcc117be79f662a2c70009e9b1 (diff) | |
download | gnunet-14f550369b00aea7e368d1d5f707df85925103b6.tar.gz gnunet-14f550369b00aea7e368d1d5f707df85925103b6.zip |
- cancel dht get for peers when done, style
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 2525793af..673ea81b5 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -5983,6 +5983,11 @@ handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
5983 | tree_set_status (t->tree, peer_info->id, MESH_PEER_READY); | 5983 | tree_set_status (t->tree, peer_info->id, MESH_PEER_READY); |
5984 | send_client_peer_connected (t, peer_info->id); | 5984 | send_client_peer_connected (t, peer_info->id); |
5985 | } | 5985 | } |
5986 | if (NULL != peer_info->dhtget) | ||
5987 | { | ||
5988 | GNUNET_DHT_get_stop (peer_info->dhtget); | ||
5989 | peer_info->dhtget = NULL; | ||
5990 | } | ||
5986 | return GNUNET_OK; | 5991 | return GNUNET_OK; |
5987 | } | 5992 | } |
5988 | 5993 | ||
@@ -5990,12 +5995,6 @@ handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
5990 | " not for us, retransmitting...\n"); | 5995 | " not for us, retransmitting...\n"); |
5991 | GNUNET_PEER_resolve (tree_get_predecessor (t->tree), &id); | 5996 | GNUNET_PEER_resolve (tree_get_predecessor (t->tree), &id); |
5992 | peer_info = peer_info_get (&msg->oid); | 5997 | peer_info = peer_info_get (&msg->oid); |
5993 | if (NULL == peer_info) | ||
5994 | { | ||
5995 | /* If we know the tunnel, we should DEFINITELY know the peer */ | ||
5996 | GNUNET_break (0); | ||
5997 | return GNUNET_OK; | ||
5998 | } | ||
5999 | send_prebuilt_message (message, &id, t); | 5998 | send_prebuilt_message (message, &id, t); |
6000 | return GNUNET_OK; | 5999 | return GNUNET_OK; |
6001 | } | 6000 | } |
@@ -6207,10 +6206,10 @@ dht_get_id_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
6207 | GNUNET_PEER_resolve (path_info->peer->id, &pi); | 6206 | GNUNET_PEER_resolve (path_info->peer->id, &pi); |
6208 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " for %s\n", GNUNET_i2s (&pi)); | 6207 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " for %s\n", GNUNET_i2s (&pi)); |
6209 | 6208 | ||
6210 | p = path_build_from_dht (get_path, get_path_length, put_path, | 6209 | p = path_build_from_dht (get_path, get_path_length, |
6211 | put_path_length); | 6210 | put_path, put_path_length); |
6212 | path_add_to_peers (p, GNUNET_NO); | 6211 | path_add_to_peers (p, GNUNET_NO); |
6213 | path_destroy(p); | 6212 | path_destroy (p); |
6214 | for (i = 0; i < path_info->peer->ntunnels; i++) | 6213 | for (i = 0; i < path_info->peer->ntunnels; i++) |
6215 | { | 6214 | { |
6216 | tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer); | 6215 | tunnel_add_peer (path_info->peer->tunnels[i], path_info->peer); |