[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26891 - gnunet/src/testbed
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26891 - gnunet/src/testbed |
Date: |
Mon, 15 Apr 2013 16:10:35 +0200 |
Author: harsha
Date: 2013-04-15 16:10:35 +0200 (Mon, 15 Apr 2013)
New Revision: 26891
Modified:
gnunet/src/testbed/gnunet-service-testbed_links.c
gnunet/src/testbed/gnunet-testbed-profiler.c
Log:
- fixes
Modified: gnunet/src/testbed/gnunet-service-testbed_links.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed_links.c 2013-04-15 12:36:37 UTC
(rev 26890)
+++ gnunet/src/testbed/gnunet-service-testbed_links.c 2013-04-15 14:10:35 UTC
(rev 26891)
@@ -762,24 +762,24 @@
GNUNET_TESTBED_operation_activate_ (n->conn_op);
n->inactive = 0;
}
+ n->reference_cnt++;
n->notify_task =
- GNUNET_SCHEDULER_add_now (&neighbour_connect_notify_task, n->nl_head);
+ GNUNET_SCHEDULER_add_now (&neighbour_connect_notify_task, n);
}
static void
neighbour_connect_notify_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- struct NeighbourConnectNotification *h = cls;
- struct Neighbour *n;
+ struct Neighbour *n = cls;
+ struct NeighbourConnectNotification *h;
- n = h->n;
+ GNUNET_assert (NULL != (h = n->nl_head));
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->notify_task);
n->notify_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (NULL != n->controller);
GNUNET_CONTAINER_DLL_remove (n->nl_head, n->nl_tail, h);
trigger_notifications (n);
- n->reference_cnt++;
h->cb (h->cb_cls, n->controller);
GNUNET_free (h);
}
@@ -859,6 +859,8 @@
return;
if (GNUNET_SCHEDULER_NO_TASK == n->notify_task)
return;
+ GNUNET_assert (0 < n->reference_cnt);
+ n->reference_cnt--;
GNUNET_SCHEDULER_cancel (n->notify_task);
n->notify_task = GNUNET_SCHEDULER_NO_TASK;
if (NULL == n->nl_head)
Modified: gnunet/src/testbed/gnunet-testbed-profiler.c
===================================================================
--- gnunet/src/testbed/gnunet-testbed-profiler.c 2013-04-15 12:36:37 UTC
(rev 26890)
+++ gnunet/src/testbed/gnunet-testbed-profiler.c 2013-04-15 14:10:35 UTC
(rev 26891)
@@ -110,9 +110,15 @@
{
shutdown_task = GNUNET_SCHEDULER_NO_TASK;
if (GNUNET_SCHEDULER_NO_TASK != abort_task)
+ {
GNUNET_SCHEDULER_cancel (abort_task);
+ abort_task = GNUNET_SCHEDULER_NO_TASK;
+ }
if (NULL != cfg)
+ {
GNUNET_CONFIGURATION_destroy (cfg);
+ cfg = NULL;
+ }
GNUNET_SCHEDULER_shutdown (); /* Stop scheduler to shutdown testbed run */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26891 - gnunet/src/testbed,
gnunet <=