aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-12 09:15:23 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-12 09:15:23 +0000
commit0c053e7ae2e82c5664c68cddb8d1ecec8108b926 (patch)
tree0063a66af06c5f5ed2eddda99743c7d34df907d2 /src/peerinfo-tool
parent817bb023f88341e7ccfa986182878d7e75300e8f (diff)
fix state machine
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index ba311dcedb..bae7fae4ca 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -723,19 +723,17 @@ state_machine (void *cls,
pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, NULL,
TIMEOUT,
&print_peer_info, NULL);
- return;
}
else if (GNUNET_YES == get_self)
{
struct GNUNET_CRYPTO_HashAsciiEncoded enc;
-
get_self = GNUNET_NO;
GNUNET_CRYPTO_hash_to_enc (&my_peer_identity.hashPubKey, &enc);
if (be_quiet)
printf ("%s\n", (char *) &enc);
else
printf (_("I am peer `%s'.\n"), (const char *) &enc);
-
+ tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
}
else if (GNUNET_YES == get_uri)
{
@@ -743,13 +741,11 @@ state_machine (void *cls,
pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity,
TIMEOUT, &print_my_uri, NULL);
get_uri = GNUNET_NO;
- return;
}
else if (NULL != dump_hello)
{
pic = GNUNET_PEERINFO_iterate (peerinfo, include_friend_only, &my_peer_identity,
TIMEOUT, &dump_my_hello, NULL);
- return;
}
else if (GNUNET_YES == default_operation)
{
@@ -757,11 +753,12 @@ state_machine (void *cls,
default_operation = GNUNET_NO;
get_info = GNUNET_YES;
tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
- return;
}
-
-
- GNUNET_SCHEDULER_shutdown ();
+ else
+ {
+ GNUNET_SCHEDULER_shutdown ();
+ }
+ default_operation = GNUNET_NO;
}