[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23798 - gnunet/src/testbed
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23798 - gnunet/src/testbed |
Date: |
Fri, 14 Sep 2012 14:14:00 +0200 |
Author: harsha
Date: 2012-09-14 14:14:00 +0200 (Fri, 14 Sep 2012)
New Revision: 23798
Modified:
gnunet/src/testbed/gnunet-service-testbed.c
gnunet/src/testbed/misc.supp
Log:
add to routing if delegated host is subordinate
Modified: gnunet/src/testbed/gnunet-service-testbed.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed.c 2012-09-14 11:51:15 UTC (rev
23797)
+++ gnunet/src/testbed/gnunet-service-testbed.c 2012-09-14 12:14:00 UTC (rev
23798)
@@ -1368,6 +1368,7 @@
if (slave_host_id == master_context->host_id) /* Link from us */
{
struct Slave *slave;
+ struct LinkControllersContext *lcc;
msize -= sizeof (struct GNUNET_TESTBED_ControllerLinkMessage);
config_size = ntohs (msg->config_size);
@@ -1416,32 +1417,30 @@
slave = GNUNET_malloc (sizeof (struct Slave));
slave->host_id = delegated_host_id;
slave_list_add (slave);
- if (1 == msg->is_subordinate)
+ if (1 != msg->is_subordinate)
{
- struct LinkControllersContext *lcc;
-
- lcc = GNUNET_malloc (sizeof (struct LinkControllersContext));
- lcc->operation_id = GNUNET_ntohll (msg->operation_id);
- GNUNET_SERVER_client_keep (client);
- lcc->client = client;
- lcc->slave = slave;
- slave->controller_proc =
- GNUNET_TESTBED_controller_start (master_context->master_ip,
- host_list[slave->host_id], cfg,
- &slave_status_callback, lcc);
- }
- else
- {
slave->controller =
GNUNET_TESTBED_controller_connect (cfg, host_list[slave->host_id],
master_context->event_mask,
&slave_event_callback, slave);
+ GNUNET_CONFIGURATION_destroy (cfg);
if (NULL != slave->controller)
send_operation_success_msg (client, GNUNET_ntohll (msg->operation_id));
else
send_operation_fail_msg (client, GNUNET_ntohll (msg->operation_id),
"Could not connect to delegated controller");
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ return;
}
+ lcc = GNUNET_malloc (sizeof (struct LinkControllersContext));
+ lcc->operation_id = GNUNET_ntohll (msg->operation_id);
+ GNUNET_SERVER_client_keep (client);
+ lcc->client = client;
+ lcc->slave = slave;
+ slave->controller_proc =
+ GNUNET_TESTBED_controller_start (master_context->master_ip,
+ host_list[slave->host_id], cfg,
+ &slave_status_callback, lcc);
GNUNET_CONFIGURATION_destroy (cfg);
new_route = GNUNET_malloc (sizeof (struct Route));
new_route->dest = delegated_host_id;
@@ -2193,8 +2192,7 @@
{
const struct GNUNET_TESTBED_OverlayConnectMessage *msg;
struct OverlayConnectContext *occ;
-
- struct GNUNET_CORE_MessageHandler no_handlers[] = {
+ const struct GNUNET_CORE_MessageHandler no_handlers[] = {
{NULL, 0, 0}
};
uint32_t p1;
Modified: gnunet/src/testbed/misc.supp
===================================================================
--- gnunet/src/testbed/misc.supp 2012-09-14 11:51:15 UTC (rev 23797)
+++ gnunet/src/testbed/misc.supp 2012-09-14 12:14:00 UTC (rev 23798)
@@ -32,3 +32,11 @@
...
obj:/lib/i386-linux-gnu/ld-2.15.so
}
+{
+ <glibc-networking>
+ Memcheck:Leak
+ fun:malloc
+ fun:make_request
+ fun:__check_pf
+}
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23798 - gnunet/src/testbed,
gnunet <=