aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r--src/mesh/gnunet-service-mesh.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index bde1a5cf4..4ce491a1f 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -6886,7 +6886,8 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
6886 GNUNET_break (0); 6886 GNUNET_break (0);
6887 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 6887 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
6888 "To Origin PID, expected %u, got %u\n", 6888 "To Origin PID, expected %u, got %u\n",
6889 clinfo->bck_pid + 1, ntohl (data_msg->pid)); 6889 clinfo->bck_pid + 1,
6890 ntohl (data_msg->pid));
6890 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 6891 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
6891 return; 6892 return;
6892 } 6893 }
@@ -6894,6 +6895,7 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
6894 /* Ok, everything is correct, send the message 6895 /* Ok, everything is correct, send the message
6895 * (pretend we got it from a mesh peer) 6896 * (pretend we got it from a mesh peer)
6896 */ 6897 */
6898 clinfo->bck_pid++;
6897 { 6899 {
6898 char buf[ntohs (message->size)] GNUNET_ALIGN; 6900 char buf[ntohs (message->size)] GNUNET_ALIGN;
6899 struct GNUNET_MESH_ToOrigin *copy; 6901 struct GNUNET_MESH_ToOrigin *copy;
@@ -6904,7 +6906,16 @@ handle_local_to_origin (void *cls, struct GNUNET_SERVER_Client *client,
6904 GNUNET_PEER_resolve (t->id.oid, &copy->oid); 6906 GNUNET_PEER_resolve (t->id.oid, &copy->oid);
6905 copy->tid = htonl (t->id.tid); 6907 copy->tid = htonl (t->id.tid);
6906 copy->ttl = htonl (default_ttl); 6908 copy->ttl = htonl (default_ttl);
6907 GNUNET_assert (ntohl (copy->pid) == (t->bck_pid + 1)); 6909 if (ntohl (copy->pid) != (t->bck_pid + 1))
6910 {
6911 GNUNET_break (0);
6912 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
6913 "To Origin PID, expected %u, got %u\n",
6914 t->bck_pid + 1,
6915 ntohl (copy->pid));
6916 return;
6917 }
6918 t->bck_pid++;
6908 copy->sender = my_full_id; 6919 copy->sender = my_full_id;
6909 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 6920 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
6910 " calling generic handler...\n"); 6921 " calling generic handler...\n");