diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-07 16:37:24 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-01-07 16:37:24 +0000 |
commit | eb0d78ddbb8884c441a3467df62659be27384056 (patch) | |
tree | 617f4907ac6448026f64b9a2d1d9f8a9507bd779 /src/testbed/testbed_api.c | |
parent | 0a67f09f0ecd7d01c304bf22e56a63d479ba4e42 (diff) | |
download | gnunet-eb0d78ddbb8884c441a3467df62659be27384056.tar.gz gnunet-eb0d78ddbb8884c441a3467df62659be27384056.zip |
- call controller callback before operation completion callback; only way to ensure that GNUNET_TESTBED_operation_done() on GNUNET_TESTBED_underlay_configure_topology() operations doesn't result in segfault.
Diffstat (limited to 'src/testbed/testbed_api.c')
-rw-r--r-- | src/testbed/testbed_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c index 91da8b5c9..07dc177bb 100644 --- a/src/testbed/testbed_api.c +++ b/src/testbed/testbed_api.c | |||
@@ -772,6 +772,8 @@ handle_peer_conevent (struct GNUNET_TESTBED_Controller *c, | |||
772 | cb_cls = data->cb_cls; | 772 | cb_cls = data->cb_cls; |
773 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); | 773 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); |
774 | opc->state = OPC_STATE_FINISHED; | 774 | opc->state = OPC_STATE_FINISHED; |
775 | if (NULL != cb) | ||
776 | cb (cb_cls, opc->op, NULL); | ||
775 | if (0 != | 777 | if (0 != |
776 | ((GNUNET_TESTBED_ET_CONNECT | GNUNET_TESTBED_ET_DISCONNECT) & | 778 | ((GNUNET_TESTBED_ET_CONNECT | GNUNET_TESTBED_ET_DISCONNECT) & |
777 | c->event_mask)) | 779 | c->event_mask)) |
@@ -779,8 +781,6 @@ handle_peer_conevent (struct GNUNET_TESTBED_Controller *c, | |||
779 | if (NULL != c->cc) | 781 | if (NULL != c->cc) |
780 | c->cc (c->cc_cls, &event); | 782 | c->cc (c->cc_cls, &event); |
781 | } | 783 | } |
782 | if (NULL != cb) | ||
783 | cb (cb_cls, opc->op, NULL); | ||
784 | return GNUNET_YES; | 784 | return GNUNET_YES; |
785 | } | 785 | } |
786 | 786 | ||