aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-test.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
commitf1f603c7d0b3f03dca46a4f313472288eb080eb1 (patch)
tree3a29966b02dfb83e0a8a8d5c42b3116380209fb0 /src/conversation/gnunet-conversation-test.c
parent53cd5b8eda2fa8db86b0907a62a39598981d008a (diff)
downloadgnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.tar.gz
gnunet-f1f603c7d0b3f03dca46a4f313472288eb080eb1.zip
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/conversation/gnunet-conversation-test.c')
-rw-r--r--src/conversation/gnunet-conversation-test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c
index cc831a3ab..108ca7b5a 100644
--- a/src/conversation/gnunet-conversation-test.c
+++ b/src/conversation/gnunet-conversation-test.c
@@ -74,12 +74,12 @@ static struct GNUNET_SPEAKER_Handle *speaker;
74/** 74/**
75 * Task scheduled to switch from recording to playback. 75 * Task scheduled to switch from recording to playback.
76 */ 76 */
77static GNUNET_SCHEDULER_TaskIdentifier switch_task; 77static struct GNUNET_SCHEDULER_Task * switch_task;
78 78
79/** 79/**
80 * The shutdown task. 80 * The shutdown task.
81 */ 81 */
82static GNUNET_SCHEDULER_TaskIdentifier st; 82static struct GNUNET_SCHEDULER_Task * st;
83 83
84/** 84/**
85 * Head of DLL with recorded frames. 85 * Head of DLL with recorded frames.
@@ -104,7 +104,7 @@ do_shutdown (void *cls,
104{ 104{
105 struct Recording *rec; 105 struct Recording *rec;
106 106
107 if (GNUNET_SCHEDULER_NO_TASK != switch_task) 107 if (NULL != switch_task)
108 GNUNET_SCHEDULER_cancel (switch_task); 108 GNUNET_SCHEDULER_cancel (switch_task);
109 if (NULL != microphone) 109 if (NULL != microphone)
110 GNUNET_MICROPHONE_destroy (microphone); 110 GNUNET_MICROPHONE_destroy (microphone);
@@ -134,7 +134,7 @@ switch_to_speaker (void *cls,
134{ 134{
135 struct Recording *rec; 135 struct Recording *rec;
136 136
137 switch_task = GNUNET_SCHEDULER_NO_TASK; 137 switch_task = NULL;
138 microphone->disable_microphone (microphone->cls); 138 microphone->disable_microphone (microphone->cls);
139 if (GNUNET_OK != 139 if (GNUNET_OK !=
140 speaker->enable_speaker (speaker->cls)) 140 speaker->enable_speaker (speaker->cls))