aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-test.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-02 21:19:33 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-02 21:19:33 +0000
commit517263c3f5134e5dba57a25e745cb276937602bc (patch)
treec373fee79171adde26b138631bd8d0c371825b69 /src/conversation/gnunet-conversation-test.c
parent875342e4d0114e626dcf502362787d048d5e12fc (diff)
downloadgnunet-517263c3f5134e5dba57a25e745cb276937602bc.tar.gz
gnunet-517263c3f5134e5dba57a25e745cb276937602bc.zip
-use util's mst, remove broken mst.c
Diffstat (limited to 'src/conversation/gnunet-conversation-test.c')
-rw-r--r--src/conversation/gnunet-conversation-test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c
index 13a55ad0c..7f8c52228 100644
--- a/src/conversation/gnunet-conversation-test.c
+++ b/src/conversation/gnunet-conversation-test.c
@@ -31,7 +31,7 @@
31/** 31/**
32 * How long do we record before we replay? 32 * How long do we record before we replay?
33 */ 33 */
34#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10) 34#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
35 35
36 36
37/** 37/**
@@ -145,10 +145,13 @@ switch_to_speaker (void *cls,
145 return; 145 return;
146 } 146 }
147 fprintf (stderr, "\nPlaying..."); 147 fprintf (stderr, "\nPlaying...");
148 for (rec=rec_head;NULL != rec; rec = rec->next) 148 for (rec=rec_head; NULL != rec; rec = rec->next)
149 {
150 fprintf (stderr, "<-%u\n", (unsigned int) rec->size);
149 speaker->play (speaker->cls, 151 speaker->play (speaker->cls,
150 rec->size, 152 rec->size,
151 &rec[1]); 153 &rec[1]);
154 }
152 GNUNET_SCHEDULER_cancel (st); 155 GNUNET_SCHEDULER_cancel (st);
153 st = GNUNET_SCHEDULER_add_delayed (TIMEOUT, 156 st = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
154 &do_shutdown, 157 &do_shutdown,
@@ -170,7 +173,7 @@ record (void *cls,
170{ 173{
171 struct Recording *rec; 174 struct Recording *rec;
172 175
173 fprintf (stderr, "."); 176 fprintf (stderr, "->%u\n", (unsigned int) data_size);
174 rec = GNUNET_malloc (sizeof (struct Recording) + data_size); 177 rec = GNUNET_malloc (sizeof (struct Recording) + data_size);
175 rec->size = data_size; 178 rec->size = data_size;
176 memcpy (&rec[1], data, data_size); 179 memcpy (&rec[1], data, data_size);
@@ -202,7 +205,9 @@ run (void *cls, char *const *args, const char *cfgfile,
202 st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 205 st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
203 &do_shutdown, 206 &do_shutdown,
204 NULL); 207 NULL);
205 fprintf (stderr, "Recording..."); 208 fprintf (stderr,
209 "Recording for %s...",
210 GNUNET_STRINGS_relative_time_to_string (TIMEOUT, GNUNET_YES));
206 if (GNUNET_OK != 211 if (GNUNET_OK !=
207 microphone->enable_microphone (microphone->cls, 212 microphone->enable_microphone (microphone->cls,
208 &record, NULL)) 213 &record, NULL))