From 386d0ee72c2b049d6708ca3156f2e998e9e92b23 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 15 Mar 2009 11:32:18 -0400 Subject: [PATCH] Allow -y for pinentry retries even without DEBUG. --- src/pwmc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pwmc.c b/src/pwmc.c index 612a91ef..5484eb58 100644 --- a/src/pwmc.c +++ b/src/pwmc.c @@ -68,8 +68,8 @@ static void usage(const char *pn) #endif #ifdef DEBUG " -E pinentry method (0=pwmd, 1=pwmd async, 2=libpwmd nb)\n" - " -y number of pinentry tries before failing (3)\n" #endif + " -y number of pinentry tries before failing (3)\n" #ifdef WITH_TCP " -H connect to hostname\n" " -R alterate port (%i)\n" @@ -235,8 +235,8 @@ int main(int argc, char *argv[]) char *known_hosts = NULL; int get = 0; #endif -#ifdef DEBUG int tries = 0; +#ifdef DEBUG int method = 0; pwmd_async_t s; #endif @@ -254,9 +254,9 @@ int main(int argc, char *argv[]) #endif #else #ifdef WITH_TCP - while ((opt = getopt(argc, argv, "C:M:GK:U:Y:H:R:t:c:I:XT:N:D:hvP:p:s:Si:d:")) != EOF) { + while ((opt = getopt(argc, argv, "y:C:M:GK:U:Y:H:R:t:c:I:XT:N:D:hvP:p:s:Si:d:")) != EOF) { #else - while ((opt = getopt(argc, argv, "C:M:t:c:I:XT:N:D:hvP:p:s:Si:d:")) != EOF) { + while ((opt = getopt(argc, argv, "y:C:M:t:c:I:XT:N:D:hvP:p:s:Si:d:")) != EOF) { #endif #endif switch (opt) { @@ -267,10 +267,10 @@ int main(int argc, char *argv[]) if (method > 2) method = 2; break; +#endif case 'y': tries = atoi(optarg); break; -#endif #ifdef WITH_TCP case 'H': host = xstrdup(optarg); @@ -557,6 +557,7 @@ int main(int argc, char *argv[]) if (error) goto done; } +#endif if (tries > 0) { error = pwmd_setopt(pwm, PWMD_OPTION_PINENTRY_TRIES, tries); @@ -564,7 +565,6 @@ int main(int argc, char *argv[]) if (error) goto done; } -#endif } if (show_status) { -- 2.11.4.GIT