[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27868 - gnunet/src/peerinfo-tool
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27868 - gnunet/src/peerinfo-tool |
Date: |
Wed, 10 Jul 2013 12:33:19 +0200 |
Author: wachs
Date: 2013-07-10 12:33:19 +0200 (Wed, 10 Jul 2013)
New Revision: 27868
Modified:
gnunet/src/peerinfo-tool/gnunet-peerinfo.c
Log:
fix: infinite loop if option was given
Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo.c 2013-07-10 10:24:28 UTC (rev
27867)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo.c 2013-07-10 10:33:19 UTC (rev
27868)
@@ -145,6 +145,11 @@
static int get_uri;
/**
+ * Option
+ */
+static int default_operation;
+
+/**
* Option '-i'
*/
static int get_info;
@@ -730,6 +735,7 @@
printf ("%s\n", (char *) &enc);
else
printf (_("I am peer `%s'.\n"), (const char *) &enc);
+
}
else if (GNUNET_YES == get_uri)
{
@@ -745,9 +751,10 @@
TIMEOUT, &dump_my_hello, NULL);
return;
}
- else
+ else if (GNUNET_YES == default_operation)
{
/* default operation list all */
+ default_operation = GNUNET_NO;
get_info = GNUNET_YES;
tt = GNUNET_SCHEDULER_add_now (&state_machine, NULL);
return;
@@ -768,6 +775,7 @@
int
main (int argc, char *const *argv)
{
+ default_operation = GNUNET_YES;
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
{'n', "numeric", NULL,
gettext_noop ("don't resolve host names"),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27868 - gnunet/src/peerinfo-tool,
gnunet <=