aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation-test.c')
-rw-r--r--src/conversation/gnunet-conversation-test.c47
1 files changed, 29 insertions, 18 deletions
diff --git a/src/conversation/gnunet-conversation-test.c b/src/conversation/gnunet-conversation-test.c
index 804df4c888..2c9ed715bc 100644
--- a/src/conversation/gnunet-conversation-test.c
+++ b/src/conversation/gnunet-conversation-test.c
@@ -2,20 +2,18 @@
This file is part of GNUnet.
Copyright (C) 2013 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
@@ -102,6 +100,7 @@ do_shutdown (void *cls)
{
struct Recording *rec;
+ (void) cls;
if (NULL != switch_task)
GNUNET_SCHEDULER_cancel (switch_task);
if (NULL != microphone)
@@ -128,8 +127,7 @@ do_shutdown (void *cls)
static void
switch_to_speaker (void *cls)
{
- struct Recording *rec;
-
+ (void) cls;
switch_task = NULL;
microphone->disable_microphone (microphone->cls);
if (GNUNET_OK !=
@@ -143,7 +141,7 @@ switch_to_speaker (void *cls)
}
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)
+ for (struct Recording *rec=rec_head; NULL != rec; rec = rec->next)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Replaying %u bytes\n",
@@ -173,6 +171,7 @@ record (void *cls,
{
struct Recording *rec;
+ (void) cls;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Recorded %u bytes\n",
(unsigned int) data_size);
@@ -194,9 +193,14 @@ record (void *cls,
* @param cfg configuration
*/
static void
-run (void *cls, char *const *args, const char *cfgfile,
+run (void *cls,
+ char *const *args,
+ const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
+ (void) cls;
+ (void) args;
+ (void) cfgfile;
microphone = GNUNET_MICROPHONE_create_from_hardware (cfg);
GNUNET_assert (NULL != microphone);
speaker = GNUNET_SPEAKER_create_from_hardware (cfg);
@@ -230,17 +234,24 @@ run (void *cls, char *const *args, const char *cfgfile,
* @return 0 ok, 1 on error
*/
int
-main (int argc, char *const *argv)
+main (int argc,
+ char *const *argv)
{
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
- if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
+
+ if (GNUNET_OK !=
+ GNUNET_STRINGS_get_utf8_args (argc, argv,
+ &argc, &argv))
return 2;
ret = (GNUNET_OK ==
- GNUNET_PROGRAM_run (argc, argv, "gnunet-conversation-test",
- gettext_noop ("help text"), options, &run,
+ GNUNET_PROGRAM_run (argc, argv,
+ "gnunet-conversation-test",
+ gettext_noop ("help text"),
+ options,
+ &run,
NULL)) ? ret : 1;
GNUNET_free ((void*) argv);
return ret;