added peer2_host field in overlay connect message
authorSree Harsha Totakura <totakura@in.tum.de>
Tue, 25 Sep 2012 12:09:42 +0000 (12:09 +0000)
committerSree Harsha Totakura <totakura@in.tum.de>
Tue, 25 Sep 2012 12:09:42 +0000 (12:09 +0000)
src/testbed/gnunet-service-testbed.c
src/testbed/testbed.h
src/testbed/testbed_api_peers.c

index c48a1e27fb021026505dcc54d67fb787322659f3..6edf8d897156593c4b05c16cdd68a84ea09a03f2 100644 (file)
@@ -1400,7 +1400,8 @@ handle_link_controllers (void *cls, struct GNUNET_SERVER_Client *client,
   if ((delegated_host_id >= host_list_size) ||
       (NULL == host_list[delegated_host_id]))
   {
-    LOG (GNUNET_ERROR_TYPE_WARNING, "Delegated host not registered with us\n");
+    LOG (GNUNET_ERROR_TYPE_WARNING,
+        "Delegated host %u not registered with us\n", delegated_host_id);
     GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
     return;
   }
index 24183e8d8a931ddc57735a7de69ae70fef6b3944..27c8e3b9303bff5d98cafdb212b0be2135d271ee 100644 (file)
@@ -397,6 +397,11 @@ struct GNUNET_TESTBED_OverlayConnectMessage
    */
   uint32_t peer2 GNUNET_PACKED;
 
+  /**
+   * The ID of the host which runs peer2
+   */
+  uint32_t peer2_host_id GNUNET_PACKED;
+
 };
 
 
index 65d4ffbd93f0b24f1a16f97722f066a287c7fa36..9b35209ca48aa053dc1495b5af825505c2b03eb2 100644 (file)
@@ -341,6 +341,7 @@ opstart_overlay_connect (void *cls)
   msg->peer1 = htonl (data->p1->unique_id);
   msg->peer2 = htonl (data->p2->unique_id);
   msg->operation_id = GNUNET_htonll (opc->id);
+  msg->peer2_host_id = htonl (GNUNET_TESTBED_host_get_id_ (data->p2->host));
   GNUNET_CONTAINER_DLL_insert_tail (opc->c->ocq_head, opc->c->ocq_tail, opc);
   GNUNET_TESTBED_queue_message_ (opc->c, &msg->header);
 }