aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-07-17 12:54:59 +0000
committerBart Polot <bart@net.in.tum.de>2013-07-17 12:54:59 +0000
commit8a075f7e6292be43c22c4fa9a4a53e078a5c136c (patch)
treea8146006f0e832971393c86fadb6c2c418d8ca9b /src/mesh
parent72da71027488bbfcb34bfce31a2ce29840767ad9 (diff)
downloadgnunet-8a075f7e6292be43c22c4fa9a4a53e078a5c136c.tar.gz
gnunet-8a075f7e6292be43c22c4fa9a4a53e078a5c136c.zip
- refactor
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 5cba49297..3b569e7a3 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -4334,26 +4334,20 @@ handle_mesh_poll (void *cls, const struct GNUNET_PeerIdentity *peer,
4334 } 4334 }
4335 4335
4336 /* Is this a forward or backward ACK? */ 4336 /* Is this a forward or backward ACK? */
4337 id = GNUNET_PEER_search(peer); 4337 id = GNUNET_PEER_search (peer);
4338 pid = ntohl (msg->pid); 4338 pid = ntohl (msg->pid);
4339 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " PID %u\n", pid); 4339 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " PID %u\n", pid);
4340 if (t->next_hop == id) 4340 if (t->next_hop == id)
4341 { 4341 {
4342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " from FWD\n"); 4342 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " from FWD\n");
4343 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " was %u\n", t->next_fc.last_pid_recv);
4344 fc = &t->next_fc; 4343 fc = &t->next_fc;
4345 old = fc->last_pid_recv; 4344 old = fc->last_pid_recv;
4346 fc->last_pid_recv = pid;
4347 tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, GNUNET_NO);
4348 } 4345 }
4349 else if (t->prev_hop == id) 4346 else if (t->prev_hop == id)
4350 { 4347 {
4351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " from BCK\n"); 4348 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " from BCK\n");
4352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " was %u\n", t->prev_fc.last_pid_recv);
4353 fc = &t->prev_fc; 4349 fc = &t->prev_fc;
4354 old = fc->last_pid_recv; 4350 old = fc->last_pid_recv;
4355 fc->last_pid_recv = pid;
4356 tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, GNUNET_YES);
4357 } 4351 }
4358 else 4352 else
4359 { 4353 {
@@ -4361,6 +4355,10 @@ handle_mesh_poll (void *cls, const struct GNUNET_PeerIdentity *peer,
4361 return GNUNET_OK; 4355 return GNUNET_OK;
4362 } 4356 }
4363 4357
4358 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " was %u\n", fc->last_pid_recv);
4359 fc->last_pid_recv = pid;
4360 tunnel_send_ack (t, GNUNET_MESSAGE_TYPE_MESH_POLL, t->prev_hop == id);
4361
4364 if (GNUNET_YES == t->reliable) 4362 if (GNUNET_YES == t->reliable)
4365 fc->last_pid_recv = old; 4363 fc->last_pid_recv = old;
4366 4364