aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2012-10-25 19:40:43 +0000
committerBart Polot <bart@net.in.tum.de>2012-10-25 19:40:43 +0000
commit2357d39265bfae86a8084b2d345c3b065fc9502d (patch)
tree68cc10e1d13ba08715753736780d94db7896ae1f
parent3b9bf5cf7700b4677985e43579d8d54a84a6fb88 (diff)
downloadgnunet-2357d39265bfae86a8084b2d345c3b065fc9502d.tar.gz
gnunet-2357d39265bfae86a8084b2d345c3b065fc9502d.zip
- fix bck numbering (fixes multicast but breaks loopback, I know)
-rw-r--r--src/mesh/gnunet-service-mesh.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index a42f235d1..3f6fa5fd8 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -7683,11 +7683,11 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
7683 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 7683 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
7684 return; 7684 return;
7685 } 7685 }
7686 clinfo->bck_pid++;
7686 7687
7687 /* Ok, everything is correct, send the message 7688 /* Ok, everything is correct, send the message
7688 * (pretend we got it from a mesh peer) 7689 * (pretend we got it from a mesh peer)
7689 */ 7690 */
7690 clinfo->bck_pid++;
7691 { 7691 {
7692 char buf[ntohs (message->size)] GNUNET_ALIGN; 7692 char buf[ntohs (message->size)] GNUNET_ALIGN;
7693 struct GNUNET_MESH_ToOrigin *copy; 7693 struct GNUNET_MESH_ToOrigin *copy;
@@ -7698,15 +7698,8 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
7698 GNUNET_PEER_resolve (t->id.oid, &copy->oid); 7698 GNUNET_PEER_resolve (t->id.oid, &copy->oid);
7699 copy->tid = htonl (t->id.tid); 7699 copy->tid = htonl (t->id.tid);
7700 copy->ttl = htonl (default_ttl); 7700 copy->ttl = htonl (default_ttl);
7701 if (ntohl (copy->pid) != (t->bck_pid + 1)) 7701 copy->pid = htonl (++(t->bck_pid));
7702 { 7702
7703 GNUNET_break (0);
7704 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
7705 "To Origin PID, expected %u, got %u\n",
7706 t->bck_pid + 1,
7707 ntohl (copy->pid));
7708 return;
7709 }
7710 copy->sender = my_full_id; 7703 copy->sender = my_full_id;
7711 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 7704 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
7712 " calling generic handler...\n"); 7705 " calling generic handler...\n");