aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation.c')
-rw-r--r--src/conversation/gnunet-conversation.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c
index ad91d3007..113c10098 100644
--- a/src/conversation/gnunet-conversation.c
+++ b/src/conversation/gnunet-conversation.c
@@ -1,17 +1,17 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2013 Christian Grothoff (and other contributing authors) 3 (C) 2013 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version. 8 option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -173,7 +173,7 @@ phone_event_handler (void *cls,
173 ...) 173 ...)
174{ 174{
175 va_list va; 175 va_list va;
176 176
177 va_start (va, code); 177 va_start (va, code);
178 switch (code) 178 switch (code)
179 { 179 {
@@ -268,7 +268,7 @@ call_event_handler (void *cls,
268 ...) 268 ...)
269{ 269{
270 va_list va; 270 va_list va;
271 271
272 va_start (va, code); 272 va_start (va, code);
273 switch (code) 273 switch (code)
274 { 274 {
@@ -338,7 +338,7 @@ struct VoipCommand
338 * Command the user needs to enter. 338 * Command the user needs to enter.
339 */ 339 */
340 const char *command; 340 const char *command;
341 341
342 /** 342 /**
343 * Function to call on command. 343 * Function to call on command.
344 */ 344 */
@@ -380,8 +380,8 @@ do_quit (const char *args)
380static void 380static void
381do_unknown (const char *msg) 381do_unknown (const char *msg)
382{ 382{
383 FPRINTF (stderr, 383 FPRINTF (stderr,
384 _("Unknown command `%s'\n"), 384 _("Unknown command `%s'\n"),
385 msg); 385 msg);
386} 386}
387 387
@@ -403,7 +403,7 @@ do_call (const char *arg)
403 } 403 }
404 switch (state) 404 switch (state)
405 { 405 {
406 case CS_LOOKUP_EGO: 406 case CS_LOOKUP_EGO:
407 FPRINTF (stderr, 407 FPRINTF (stderr,
408 _("Ego `%s' not available\n"), 408 _("Ego `%s' not available\n"),
409 ego_name); 409 ego_name);
@@ -470,7 +470,7 @@ do_accept (const char *args)
470{ 470{
471 switch (state) 471 switch (state)
472 { 472 {
473 case CS_LOOKUP_EGO: 473 case CS_LOOKUP_EGO:
474 case CS_LISTEN: 474 case CS_LISTEN:
475 case CS_ERROR: 475 case CS_ERROR:
476 FPRINTF (stderr, 476 FPRINTF (stderr,
@@ -497,7 +497,7 @@ do_accept (const char *args)
497 return; 497 return;
498 } 498 }
499 GNUNET_assert (NULL != phone); 499 GNUNET_assert (NULL != phone);
500 GNUNET_CONVERSATION_phone_pick_up (phone, 500 GNUNET_CONVERSATION_phone_pick_up (phone,
501 args, 501 args,
502 speaker, 502 speaker,
503 mic); 503 mic);
@@ -536,7 +536,7 @@ do_status (const char *args)
536{ 536{
537 switch (state) 537 switch (state)
538 { 538 {
539 case CS_LOOKUP_EGO: 539 case CS_LOOKUP_EGO:
540 FPRINTF (stdout, 540 FPRINTF (stdout,
541 _("We are currently trying to locate the private key for the ego `%s'.\n"), 541 _("We are currently trying to locate the private key for the ego `%s'.\n"),
542 ego_name); 542 ego_name);
@@ -586,7 +586,7 @@ do_reject (const char *args)
586{ 586{
587 switch (state) 587 switch (state)
588 { 588 {
589 case CS_LOOKUP_EGO: 589 case CS_LOOKUP_EGO:
590 case CS_LISTEN: 590 case CS_LISTEN:
591 case CS_ERROR: 591 case CS_ERROR:
592 FPRINTF (stderr, 592 FPRINTF (stderr,
@@ -604,7 +604,7 @@ do_reject (const char *args)
604 if (NULL == call) 604 if (NULL == call)
605 { 605 {
606 GNUNET_assert (NULL != phone); 606 GNUNET_assert (NULL != phone);
607 GNUNET_CONVERSATION_phone_hang_up (phone, 607 GNUNET_CONVERSATION_phone_hang_up (phone,
608 args); 608 args);
609 state = CS_LISTEN; 609 state = CS_LISTEN;
610 } 610 }
@@ -621,9 +621,9 @@ do_reject (const char *args)
621 * List of supported commands. 621 * List of supported commands.
622 */ 622 */
623static struct VoipCommand commands[] = { 623static struct VoipCommand commands[] = {
624 {"/address", &do_address, 624 {"/address", &do_address,
625 gettext_noop ("Use `/address' to find out which address this phone should have in GNS")}, 625 gettext_noop ("Use `/address' to find out which address this phone should have in GNS")},
626 {"/call", &do_call, 626 {"/call", &do_call,
627 gettext_noop ("Use `/call USER.gnu' to call USER")}, 627 gettext_noop ("Use `/call USER.gnu' to call USER")},
628 {"/accept", &do_accept, 628 {"/accept", &do_accept,
629 gettext_noop ("Use `/accept MESSAGE' to accept an incoming call")}, 629 gettext_noop ("Use `/accept MESSAGE' to accept an incoming call")},
@@ -631,11 +631,11 @@ static struct VoipCommand commands[] = {
631 gettext_noop ("Use `/cancel MESSAGE' to reject or terminate a call")}, 631 gettext_noop ("Use `/cancel MESSAGE' to reject or terminate a call")},
632 {"/status", &do_status, 632 {"/status", &do_status,
633 gettext_noop ("Use `/status' to print status information")}, 633 gettext_noop ("Use `/status' to print status information")},
634 {"/quit", &do_quit, 634 {"/quit", &do_quit,
635 gettext_noop ("Use `/quit' to terminate gnunet-conversation")}, 635 gettext_noop ("Use `/quit' to terminate gnunet-conversation")},
636 {"/help", &do_help, 636 {"/help", &do_help,
637 gettext_noop ("Use `/help command' to get help for a specific command")}, 637 gettext_noop ("Use `/help command' to get help for a specific command")},
638 {"", &do_unknown, 638 {"", &do_unknown,
639 NULL}, 639 NULL},
640 {NULL, NULL, NULL}, 640 {NULL, NULL, NULL},
641}; 641};
@@ -650,8 +650,8 @@ static void
650do_help (const char *args) 650do_help (const char *args)
651{ 651{
652 unsigned int i; 652 unsigned int i;
653 653
654 i = 0; 654 i = 0;
655 while ( (NULL != args) && 655 while ( (NULL != args) &&
656 (0 != strlen (args)) && 656 (0 != strlen (args)) &&
657 (commands[i].Action != &do_help)) 657 (commands[i].Action != &do_help))
@@ -659,7 +659,7 @@ do_help (const char *args)
659 if (0 == 659 if (0 ==
660 strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1)) 660 strncasecmp (&args[1], &commands[i].command[1], strlen (args) - 1))
661 { 661 {
662 FPRINTF (stdout, 662 FPRINTF (stdout,
663 "%s\n", 663 "%s\n",
664 gettext (commands[i].helptext)); 664 gettext (commands[i].helptext));
665 return; 665 return;
@@ -667,13 +667,13 @@ do_help (const char *args)
667 i++; 667 i++;
668 } 668 }
669 i = 0; 669 i = 0;
670 FPRINTF (stdout, 670 FPRINTF (stdout,
671 "%s", 671 "%s",
672 "Available commands:\n"); 672 "Available commands:\n");
673 while (commands[i].Action != &do_help) 673 while (commands[i].Action != &do_help)
674 { 674 {
675 FPRINTF (stdout, 675 FPRINTF (stdout,
676 "%s\n", 676 "%s\n",
677 gettext (commands[i].command)); 677 gettext (commands[i].command));
678 i++; 678 i++;
679 } 679 }
@@ -710,7 +710,7 @@ do_stop_task (void *cls,
710 { 710 {
711 GNUNET_SCHEDULER_cancel (handle_cmd_task); 711 GNUNET_SCHEDULER_cancel (handle_cmd_task);
712 handle_cmd_task = GNUNET_SCHEDULER_NO_TASK; 712 handle_cmd_task = GNUNET_SCHEDULER_NO_TASK;
713 } 713 }
714 if (NULL != id) 714 if (NULL != id)
715 { 715 {
716 GNUNET_IDENTITY_disconnect (id); 716 GNUNET_IDENTITY_disconnect (id);
@@ -799,7 +799,7 @@ identity_cb (void *cls,
799 ego_name)) 799 ego_name))
800 return; 800 return;
801 if (NULL == ego) 801 if (NULL == ego)
802 { 802 {
803 if (verbose) 803 if (verbose)
804 FPRINTF (stdout, 804 FPRINTF (stdout,
805 _("Our ego `%s' was deleted!\n"), 805 _("Our ego `%s' was deleted!\n"),
@@ -826,7 +826,7 @@ identity_cb (void *cls,
826 */ 826 */
827static void 827static void
828run (void *cls, 828run (void *cls,
829 char *const *args, 829 char *const *args,
830 const char *cfgfile, 830 const char *cfgfile,
831 const struct GNUNET_CONFIGURATION_Handle *c) 831 const struct GNUNET_CONFIGURATION_Handle *c)
832{ 832{
@@ -851,7 +851,7 @@ run (void *cls,
851} 851}
852 852
853 853
854/** 854/**
855 * The main function to conversation. 855 * The main function to conversation.
856 * 856 *
857 * @param argc number of arguments from the command line 857 * @param argc number of arguments from the command line