- code cleanup
authorBart Polot <bart@net.in.tum.de>
Sat, 30 Nov 2013 01:17:20 +0000 (01:17 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 30 Nov 2013 01:17:20 +0000 (01:17 +0000)
src/mesh/gnunet-service-mesh_connection.c

index 409172c34b9a48502494f4f9a2854988f65f221f..580595ffb72401c8527711a67493d17aab036c0f 100644 (file)
@@ -2699,13 +2699,16 @@ GMC_send_create (struct MeshConnection *connection)
 
   size = sizeof (struct GNUNET_MESH_ConnectionCreate);
   size += connection->path->length * sizeof (struct GNUNET_PeerIdentity);
+
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Send connection create\n");
-  GMP_queue_add (get_next_hop (connection), NULL,
-                 GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE,
-                 size, connection, GNUNET_YES, &message_sent, NULL);
   LOG (GNUNET_ERROR_TYPE_DEBUG, "  C_P+ %p %u (create)\n",
        connection, connection->pending_messages);
   connection->pending_messages++;
+
+  GMP_queue_add (get_next_hop (connection), NULL,
+                 GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE,
+                 size, connection, GNUNET_YES, &message_sent, NULL);
+
   state = GMT_get_cstate (connection->t);
   if (MESH_TUNNEL3_SEARCHING == state || MESH_TUNNEL3_NEW == state)
     GMT_change_cstate (connection->t, MESH_TUNNEL3_WAITING);