From 2357d39265bfae86a8084b2d345c3b065fc9502d Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 25 Oct 2012 19:40:43 +0000 Subject: [PATCH] - fix bck numbering (fixes multicast but breaks loopback, I know) --- src/mesh/gnunet-service-mesh.c | 13 +++---------- 1 file 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, GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } + clinfo->bck_pid++; /* Ok, everything is correct, send the message * (pretend we got it from a mesh peer) */ - clinfo->bck_pid++; { char buf[ntohs (message->size)] GNUNET_ALIGN; struct GNUNET_MESH_ToOrigin *copy; @@ -7698,15 +7698,8 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client, GNUNET_PEER_resolve (t->id.oid, ©->oid); copy->tid = htonl (t->id.tid); copy->ttl = htonl (default_ttl); - if (ntohl (copy->pid) != (t->bck_pid + 1)) - { - GNUNET_break (0); - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "To Origin PID, expected %u, got %u\n", - t->bck_pid + 1, - ntohl (copy->pid)); - return; - } + copy->pid = htonl (++(t->bck_pid)); + copy->sender = my_full_id; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " calling generic handler...\n"); -- 2.25.1