aboutsummaryrefslogtreecommitdiff
path: root/src/regex/gnunet-regex-profiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex/gnunet-regex-profiler.c')
-rw-r--r--src/regex/gnunet-regex-profiler.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c
index 0f9574c8b..029ea5b94 100644
--- a/src/regex/gnunet-regex-profiler.c
+++ b/src/regex/gnunet-regex-profiler.c
@@ -1048,6 +1048,23 @@ arm_da (void *cls, void *op_result)
1048 } 1048 }
1049} 1049}
1050 1050
1051/**
1052 * Finish and free the operation used to start the regex daemon.
1053 * operation_done calls ARM_disconnect, which cannot happen inside an
1054 * ARM callback.
1055 *
1056 * @param cls Closure (Peer info)
1057 * @param tc TaskContext
1058 */
1059static void
1060arm_op_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1061{
1062 struct RegexPeer *peer = (struct RegexPeer *) cls;
1063
1064 GNUNET_TESTBED_operation_done (peer->op_handle);
1065 peer->op_handle = NULL;
1066}
1067
1051static void 1068static void
1052arm_start_cb (void *cls, struct GNUNET_ARM_Handle *arm, 1069arm_start_cb (void *cls, struct GNUNET_ARM_Handle *arm,
1053 enum GNUNET_ARM_RequestStatus rs, const char *service, 1070 enum GNUNET_ARM_RequestStatus rs, const char *service,
@@ -1074,8 +1091,7 @@ arm_start_cb (void *cls, struct GNUNET_ARM_Handle *arm,
1074 * Service is currently being started (due to client request). 1091 * Service is currently being started (due to client request).
1075 */ 1092 */
1076 case GNUNET_ARM_RESULT_STARTING: 1093 case GNUNET_ARM_RESULT_STARTING:
1077 GNUNET_TESTBED_operation_done (peer->op_handle); 1094 GNUNET_SCHEDULER_add_now (&arm_op_done, peer);
1078 peer->op_handle = NULL;
1079 1095
1080 if (peer_cnt < (num_peers - 1)) 1096 if (peer_cnt < (num_peers - 1))
1081 { 1097 {