-fix mesh tunnel destruction
[oweals/gnunet.git] / src / conversation / gnunet-conversation-test.c
index 13a55ad0c50a3d5ddd57b95720481756df109a06..1f44ca1fc34b02c6208c8cfc7f4bf7bb4d62968f 100644 (file)
@@ -31,7 +31,7 @@
 /**
  * How long do we record before we replay?
  */
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
 
 
 /**
@@ -117,7 +117,8 @@ do_shutdown (void *cls,
                                 rec);
     GNUNET_free (rec);
   }
-  fprintf (stderr, "\n");
+  fprintf (stderr, 
+          _("\nEnd of transmission.  Have a GNU day.\n"));
 }
 
 
@@ -144,11 +145,17 @@ switch_to_speaker (void *cls,
     GNUNET_SCHEDULER_shutdown ();
     return;
   }
-  fprintf (stderr, "\nPlaying...");
-  for (rec=rec_head;NULL != rec; rec = rec->next)
+  fprintf (stderr, 
+          _("\nWe are now playing your recording back.  If you can hear it, your audio settings are working..."));
+  for (rec=rec_head; NULL != rec; rec = rec->next)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "Replaying %u bytes\n",
+               (unsigned int) rec->size);
     speaker->play (speaker->cls,
                   rec->size,
                   &rec[1]);
+  }
   GNUNET_SCHEDULER_cancel (st);
   st = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
                                     &do_shutdown,
@@ -170,7 +177,9 @@ record (void *cls,
 {
   struct Recording *rec;
 
-  fprintf (stderr, ".");
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Recorded %u bytes\n",
+             (unsigned int) data_size);
   rec = GNUNET_malloc (sizeof (struct Recording) + data_size);
   rec->size = data_size;
   memcpy (&rec[1], data, data_size);
@@ -202,7 +211,9 @@ run (void *cls, char *const *args, const char *cfgfile,
   st = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
                                     &do_shutdown,
                                     NULL);
-  fprintf (stderr, "Recording...");
+  fprintf (stderr, 
+          _("We will now be recording you for %s. After that time, the recording will be played back to you..."),
+          GNUNET_STRINGS_relative_time_to_string (TIMEOUT, GNUNET_YES));
   if (GNUNET_OK !=
       microphone->enable_microphone (microphone->cls,
                                     &record, NULL))