diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 09:15:23 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-07-12 09:15:23 +0000 |
commit | 0c053e7ae2e82c5664c68cddb8d1ecec8108b926 (patch) | |
tree | 0063a66af06c5f5ed2eddda99743c7d34df907d2 /src/peerinfo-tool | |
parent | 817bb023f88341e7ccfa986182878d7e75300e8f (diff) |
fix state machine
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r-- | src/peerinfo-tool/gnunet-peerinfo.c | 15 |
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; } |