aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-29 10:26:34 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-29 10:26:34 +0000
commit7dd09367e1e6e400b56cc3ad18d7d906980cba80 (patch)
tree83d1ff971926234cadc304d0b671b384059e1473 /src
parentfae41d25c9ce4ca87e2fb549ccdbdf9589db4ff9 (diff)
downloadgnunet-7dd09367e1e6e400b56cc3ad18d7d906980cba80.tar.gz
gnunet-7dd09367e1e6e400b56cc3ad18d7d906980cba80.zip
-do not segv on controller crash
Diffstat (limited to 'src')
-rw-r--r--src/testbed/testbed_api_testbed.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c
index 5fd59fe61..2fdd2356a 100644
--- a/src/testbed/testbed_api_testbed.c
+++ b/src/testbed/testbed_api_testbed.c
@@ -624,12 +624,14 @@ interrupt (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
624 rc->interrupt_task = GNUNET_SCHEDULER_add_delayed 624 rc->interrupt_task = GNUNET_SCHEDULER_add_delayed
625 (GNUNET_TIME_UNIT_FOREVER_REL, &interrupt, rc); 625 (GNUNET_TIME_UNIT_FOREVER_REL, &interrupt, rc);
626 rc_cleanup_operations (rc); 626 rc_cleanup_operations (rc);
627 if ( (GNUNET_NO == rc->shutdown) 627 if ( (GNUNET_NO == rc->shutdown) &&
628 && (NULL != c) 628 (NULL != c) &&
629 && (0 != (size = GNUNET_CONTAINER_multihashmap32_size (c->opc_map)))) 629 (NULL != c->opc_map) &&
630 (0 != (size = GNUNET_CONTAINER_multihashmap32_size (c->opc_map))))
630 { 631 {
631 LOG (GNUNET_ERROR_TYPE_WARNING, "Shutdown postponed as there are " 632 LOG (GNUNET_ERROR_TYPE_WARNING,
632 "%u operations currently active\n", size); 633 "Shutdown postponed as there are %u operations currently active\n",
634 size);
633 c->opcq_empty_cb = &wait_op_completion; 635 c->opcq_empty_cb = &wait_op_completion;
634 c->opcq_empty_cls = rc; 636 c->opcq_empty_cls = rc;
635 return; 637 return;