[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17024 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17024 - gnunet/src/mesh |
Date: |
Mon, 26 Sep 2011 21:44:27 +0200 |
Author: bartpolot
Date: 2011-09-26 21:44:27 +0200 (Mon, 26 Sep 2011)
New Revision: 17024
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed updating status of peer on ACK
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2011-09-26 19:25:25 UTC (rev
17023)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2011-09-26 19:44:27 UTC (rev
17024)
@@ -1977,8 +1977,6 @@
*
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
- *
- * FIXME path change state
*/
static int
handle_mesh_path_ack (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -1986,8 +1984,9 @@
const struct GNUNET_TRANSPORT_ATS_Information *atsi)
{
struct GNUNET_MESH_PathACK *msg;
+ struct MeshTunnelTreeNode *n;
+ struct MeshPeerInfo *peer_info;
struct MeshTunnel *t;
- struct MeshPeerInfo *peer_info;
msg = (struct GNUNET_MESH_PathACK *) message;
t = tunnel_get (&msg->oid, msg->tid);
@@ -2000,10 +1999,9 @@
/* Message for us? */
if (0 == memcmp (&msg->oid, &my_full_id, sizeof (struct
GNUNET_PeerIdentity)))
{
-
if (NULL == t->client)
{
- GNUNET_break (0);
+ GNUNET_break_op (0);
return GNUNET_OK;
}
peer_info = peer_info_get (&msg->peer_id);
@@ -2012,7 +2010,13 @@
GNUNET_break_op (0);
return GNUNET_OK;
}
- /* FIXME change state of peer */
+ n = tree_find_peer(t->tree, peer_info->id);
+ if (NULL == n)
+ {
+ GNUNET_break_op (0);
+ return GNUNET_OK;
+ }
+ n->status = MESH_PEER_READY;
send_client_peer_connected(t, peer_info->id);
return GNUNET_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17024 - gnunet/src/mesh,
gnunet <=