- fix infinite resend loop
authorBart Polot <bart@net.in.tum.de>
Sat, 22 Mar 2014 02:58:28 +0000 (02:58 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 22 Mar 2014 02:58:28 +0000 (02:58 +0000)
src/mesh/gnunet-service-mesh_connection.c

index 40e43e99158f6f603a23b110fae99c3cceaae69a..007dcf27696a7ae1c88a87efbfb3c912d80fde99 100644 (file)
@@ -1588,7 +1588,7 @@ GMC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
   orig_peer = GMP_get (&id[0]);
 
   /* Is it a connection to us? */
-  if (c->own_pos == size - 1)
+  if (c->own_pos == path->length - 1)
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  It's for us!\n");
     GMP_add_path_to_origin (orig_peer, path_duplicate (path), GNUNET_YES);