aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-exchange.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/taler-auditor-exchange.c')
-rw-r--r--src/auditor/taler-auditor-exchange.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/auditor/taler-auditor-exchange.c b/src/auditor/taler-auditor-exchange.c
index 04c13fd0d..3cd6edf09 100644
--- a/src/auditor/taler-auditor-exchange.c
+++ b/src/auditor/taler-auditor-exchange.c
@@ -66,13 +66,14 @@ main (int argc,
66 char *cfgfile = NULL; 66 char *cfgfile = NULL;
67 const struct GNUNET_GETOPT_CommandLineOption options[] = { 67 const struct GNUNET_GETOPT_CommandLineOption options[] = {
68 GNUNET_GETOPT_option_cfgfile (&cfgfile), 68 GNUNET_GETOPT_option_cfgfile (&cfgfile),
69 GNUNET_GETOPT_option_help ("Add or remove exchange to list of audited exchanges"), 69 GNUNET_GETOPT_option_help (
70 "Add or remove exchange to list of audited exchanges"),
70 GNUNET_GETOPT_option_mandatory 71 GNUNET_GETOPT_option_mandatory
71 (GNUNET_GETOPT_option_base32_auto ('m', 72 (GNUNET_GETOPT_option_base32_auto ('m',
72 "exchange-key", 73 "exchange-key",
73 "KEY", 74 "KEY",
74 "public key of the exchange (Crockford base32 encoded)", 75 "public key of the exchange (Crockford base32 encoded)",
75 &master_public_key)), 76 &master_public_key)),
76 GNUNET_GETOPT_option_string ('u', 77 GNUNET_GETOPT_option_string ('u',
77 "exchange-url", 78 "exchange-url",
78 "URL", 79 "URL",
@@ -108,7 +109,7 @@ main (int argc,
108 cfgfile)) 109 cfgfile))
109 { 110 {
110 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 111 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
111 _("Malformed configuration file `%s', exit ...\n"), 112 _ ("Malformed configuration file `%s', exit ...\n"),
112 cfgfile); 113 cfgfile);
113 GNUNET_free_non_null (cfgfile); 114 GNUNET_free_non_null (cfgfile);
114 return 1; 115 return 1;
@@ -120,22 +121,22 @@ main (int argc,
120 if (NULL == exchange_url) 121 if (NULL == exchange_url)
121 { 122 {
122 FPRINTF (stderr, 123 FPRINTF (stderr,
123 _("Missing either `%s' or `%s'.\n"), 124 _ ("Missing either `%s' or `%s'.\n"),
124 "-u URL", 125 "-u URL",
125 "--remove"); 126 "--remove");
126 return 1; 127 return 1;
127 } 128 }
128 if ( (0 == strlen (exchange_url)) || 129 if ( (0 == strlen (exchange_url)) ||
129 ( (0 != strncasecmp ("http://", 130 ( (0 != strncasecmp ("http://",
130 exchange_url, 131 exchange_url,
131 strlen ("http://"))) && 132 strlen ("http://"))) &&
132 (0 != strncasecmp ("https://", 133 (0 != strncasecmp ("https://",
133 exchange_url, 134 exchange_url,
134 strlen ("https://"))) ) || 135 strlen ("https://"))) ) ||
135 ('/' != exchange_url[strlen(exchange_url)-1]) ) 136 ('/' != exchange_url[strlen (exchange_url) - 1]) )
136 { 137 {
137 fprintf (stderr, 138 fprintf (stderr,
138 "Exchange URL must begin with `http://` or `https://` and end with `/'\n"); 139 "Exchange URL must begin with `http://` or `https://` and end with `/'\n");
139 return 1; 140 return 1;
140 } 141 }
141 } 142 }