- initialize pid for case of error
authorBart Polot <bart@net.in.tum.de>
Thu, 11 Oct 2012 16:19:50 +0000 (16:19 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 11 Oct 2012 16:19:50 +0000 (16:19 +0000)
src/mesh/gnunet-service-mesh.c

index 006cc3b38a8109016590d078f1cf9b9d5cd8cf6b..506cb9d207d5d83b6b9c3ffa68f48b2d3ca70b4e 100644 (file)
@@ -5742,6 +5742,7 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " of type %s\n",
               GNUNET_MESH_DEBUG_M2S (ntohs (msg[1].header.type)));
   t = tunnel_get (&msg->oid, ntohl (msg->tid));
+  pid = ntohl (msg->pid);
 
   if (NULL == t)
   {
@@ -5754,7 +5755,6 @@ handle_mesh_data_to_orig (void *cls, const struct GNUNET_PeerIdentity *peer,
     return GNUNET_OK;
   }
 
-  pid = ntohl (msg->pid);
   if (t->bck_pid == pid)
   {
     /* already seen this packet, drop */