aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool/gnunet-peerinfo.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-10 10:24:28 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-10 10:24:28 +0000
commitd1161f4ec0637717c8a4f1af1c8ad41b8b14463a (patch)
tree34dfe18c81bb2eccba205e316dc818c826b20022 /src/peerinfo-tool/gnunet-peerinfo.c
parent241626de97c0b745e64377ca948841f21d2f68d6 (diff)
downloadgnunet-d1161f4ec0637717c8a4f1af1c8ad41b8b14463a.tar.gz
gnunet-d1161f4ec0637717c8a4f1af1c8ad41b8b14463a.zip
add default operation when no argument is given
Diffstat (limited to 'src/peerinfo-tool/gnunet-peerinfo.c')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 74ee1726f..34262aa6d 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -711,7 +711,7 @@ state_machine (void *cls,
711 put_uri = NULL; 711 put_uri = NULL;
712 return; 712 return;
713 } 713 }
714 if (GNUNET_YES == get_info) 714 else if (GNUNET_YES == get_info)
715 { 715 {
716 get_info = GNUNET_NO; 716 get_info = GNUNET_NO;
717 GPI_plugins_load (cfg); 717 GPI_plugins_load (cfg);
@@ -720,7 +720,7 @@ state_machine (void *cls,
720 &print_peer_info, NULL); 720 &print_peer_info, NULL);
721 return; 721 return;
722 } 722 }
723 if (GNUNET_YES == get_self) 723 else if (GNUNET_YES == get_self)
724 { 724 {
725 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 725 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
726 726
@@ -731,7 +731,7 @@ state_machine (void *cls,
731 else 731 else
732 printf (_("I am peer `%s'.\n"), (const char *) &enc); 732 printf (_("I am peer `%s'.\n"), (const char *) &enc);
733 } 733 }
734 if (GNUNET_YES == get_uri) 734 else if (GNUNET_YES == get_uri)
735 { 735 {
736 GPI_plugins_load (cfg); 736 GPI_plugins_load (cfg);
737 pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity, 737 pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity,
@@ -739,12 +739,21 @@ state_machine (void *cls,
739 get_uri = GNUNET_NO; 739 get_uri = GNUNET_NO;
740 return; 740 return;
741 } 741 }
742 if (NULL != dump_hello) 742 else if (NULL != dump_hello)
743 { 743 {
744 pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity, 744 pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity,
745 TIMEOUT, &dump_my_hello, NULL); 745 TIMEOUT, &dump_my_hello, NULL);
746 return; 746 return;
747 } 747 }
748 else
749 {
750 /* default operation list all */
751 get_info = GNUNET_YES;
752 tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
753 return;
754 }
755
756
748 GNUNET_SCHEDULER_shutdown (); 757 GNUNET_SCHEDULER_shutdown ();
749} 758}
750 759