aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gns/gnunet-bcd.c257
1 files changed, 122 insertions, 135 deletions
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c
index db7e68c49..f3249eee0 100644
--- a/src/gns/gnunet-bcd.c
+++ b/src/gns/gnunet-bcd.c
@@ -31,12 +31,14 @@
31/** 31/**
32 * Error page to display if submitted GNS key is invalid. 32 * Error page to display if submitted GNS key is invalid.
33 */ 33 */
34#define INVALID_GNSKEY "<html><head><title>Error</title><body>Invalid GNS public key given.</body></html>" 34#define INVALID_GNSKEY \
35 "<html><head><title>Error</title><body>Invalid GNS public key given.</body></html>"
35 36
36/** 37/**
37 * Error page to display on 404. 38 * Error page to display on 404.
38 */ 39 */
39#define NOT_FOUND "<html><head><title>Error</title><body>404 not found</body></html>" 40#define NOT_FOUND \
41 "<html><head><title>Error</title><body>404 not found</body></html>"
40 42
41/** 43/**
42 * Handle to the HTTP server as provided by libmicrohttpd 44 * Handle to the HTTP server as provided by libmicrohttpd
@@ -51,7 +53,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg;
51/** 53/**
52 * Our primary task for the HTTPD. 54 * Our primary task for the HTTPD.
53 */ 55 */
54static struct GNUNET_SCHEDULER_Task * http_task; 56static struct GNUNET_SCHEDULER_Task *http_task;
55 57
56/** 58/**
57 * Our main website. 59 * Our main website.
@@ -91,54 +93,53 @@ struct Entry
91 */ 93 */
92static int 94static int
93access_handler_callback (void *cls, 95access_handler_callback (void *cls,
94 struct MHD_Connection *connection, 96 struct MHD_Connection *connection,
95 const char *url, 97 const char *url,
96 const char *method, 98 const char *method,
97 const char *version, 99 const char *version,
98 const char *upload_data, 100 const char *upload_data,
99 size_t * upload_data_size, 101 size_t *upload_data_size,
100 void **con_cls) 102 void **con_cls)
101{ 103{
102 static int dummy; 104 static int dummy;
103 static const struct Entry map[] = { 105 static const struct Entry map[] = {{"prefix", "prefix"},
104 { "prefix", "prefix" }, 106 {"name", "name"},
105 { "name", "name" }, 107 {"suffix", "suffix"},
106 { "suffix", "suffix" }, 108 {"street", "street"},
107 { "street", "street" }, 109 {"city", "city"},
108 { "city", "city" }, 110 {"phone", "phone"},
109 { "phone", "phone" }, 111 {"fax", "fax"},
110 { "fax", "fax" }, 112 {"email", "email"},
111 { "email", "email"}, 113 {"homepage", "homepage"},
112 { "homepage", "homepage" }, 114 {"orga", "orga"},
113 { "orga", "orga"}, 115 {"departmenti18n", "departmentde"},
114 { "departmenti18n", "departmentde"}, 116 {"departmenten", "departmenten"},
115 { "departmenten", "departmenten"}, 117 {"subdepartmenti18n", "subdepartmentde"},
116 { "subdepartmenti18n", "subdepartmentde"}, 118 {"subdepartmenten", "subdepartmenten"},
117 { "subdepartmenten", "subdepartmenten"}, 119 {"jobtitlei18n", "jobtitlegerman"},
118 { "jobtitlei18n", "jobtitlegerman"}, 120 {"jobtitleen", "jobtitleenglish"},
119 { "jobtitleen", "jobtitleenglish"}, 121 {"subdepartmenten", "subdepartmenten"},
120 { "subdepartmenten", "subdepartmenten"}, 122 {NULL, NULL}};
121 { NULL, NULL } 123
122 }; 124 (void) cls;
123 125 (void) version;
126 (void) upload_data;
127 (void) upload_data_size;
124 if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) 128 if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
125 { 129 {
126 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 130 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
127 _("Refusing `%s' request to HTTP server\n"), 131 _ ("Refusing `%s' request to HTTP server\n"),
128 method); 132 method);
129 return MHD_NO; 133 return MHD_NO;
130 } 134 }
131 if (NULL == *con_cls) 135 if (NULL == *con_cls)
132 { 136 {
133 (*con_cls) = &dummy; 137 (*con_cls) = &dummy;
134 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 138 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending 100 CONTINUE reply\n");
135 "Sending 100 CONTINUE reply\n"); 139 return MHD_YES; /* send 100 continue */
136 return MHD_YES; /* send 100 continue */
137 } 140 }
138 if (0 == strcasecmp (url, "/")) 141 if (0 == strcasecmp (url, "/"))
139 return MHD_queue_response (connection, 142 return MHD_queue_response (connection, MHD_HTTP_OK, main_response);
140 MHD_HTTP_OK,
141 main_response);
142 if (0 == strcasecmp (url, "/submit.pdf")) 143 if (0 == strcasecmp (url, "/submit.pdf"))
143 { 144 {
144 unsigned int i; 145 unsigned int i;
@@ -159,14 +160,13 @@ access_handler_callback (void *cls,
159 const char *gns_nick = MHD_lookup_connection_value (connection, 160 const char *gns_nick = MHD_lookup_connection_value (connection,
160 MHD_GET_ARGUMENT_KIND, 161 MHD_GET_ARGUMENT_KIND,
161 "gnsnick"); 162 "gnsnick");
162 const char *gnskey = MHD_lookup_connection_value (connection, 163 const char *gnskey =
163 MHD_GET_ARGUMENT_KIND, 164 MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "gnskey");
164 "gnskey"); 165 if ((NULL == gnskey) ||
165 if ( (NULL == gnskey) || 166 (GNUNET_OK !=
166 (GNUNET_OK != 167 GNUNET_CRYPTO_ecdsa_public_key_from_string (gnskey,
167 GNUNET_CRYPTO_ecdsa_public_key_from_string (gnskey, 168 strlen (gnskey),
168 strlen (gnskey), 169 &pub)))
169 &pub)))
170 { 170 {
171 return MHD_queue_response (connection, 171 return MHD_queue_response (connection,
172 MHD_HTTP_OK, 172 MHD_HTTP_OK,
@@ -178,9 +178,7 @@ access_handler_callback (void *cls,
178 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "mktemp", gnskey); 178 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "mktemp", gnskey);
179 return MHD_NO; 179 return MHD_NO;
180 } 180 }
181 GNUNET_asprintf (&deffile, 181 GNUNET_asprintf (&deffile, "%s%s%s", tmp, DIR_SEPARATOR_STR, "def.tex");
182 "%s%s%s",
183 tmp, DIR_SEPARATOR_STR, "def.tex");
184 f = FOPEN (deffile, "w"); 182 f = FOPEN (deffile, "w");
185 if (NULL == f) 183 if (NULL == f)
186 { 184 {
@@ -190,19 +188,15 @@ access_handler_callback (void *cls,
190 GNUNET_free (tmp); 188 GNUNET_free (tmp);
191 return MHD_NO; 189 return MHD_NO;
192 } 190 }
193 for (i=0; NULL != map[i].formname; i++) 191 for (i = 0; NULL != map[i].formname; i++)
194 { 192 {
195 const char *val = MHD_lookup_connection_value (connection, 193 const char *val = MHD_lookup_connection_value (connection,
196 MHD_GET_ARGUMENT_KIND, 194 MHD_GET_ARGUMENT_KIND,
197 map[i].formname); 195 map[i].formname);
198 if (NULL != val) 196 if (NULL != val)
199 FPRINTF (f, 197 FPRINTF (f, "\\def\\%s{%s}\n", map[i].texname, val);
200 "\\def\\%s{%s}\n",
201 map[i].texname, val);
202 else 198 else
203 FPRINTF (f, 199 FPRINTF (f, "\\def\\%s{}\n", map[i].texname);
204 "\\def\\%s{}\n",
205 map[i].texname);
206 } 200 }
207 if (NULL != gpg_fp) 201 if (NULL != gpg_fp)
208 { 202 {
@@ -212,9 +206,7 @@ access_handler_callback (void *cls,
212 slen = strlen (gpg_fp); 206 slen = strlen (gpg_fp);
213 gpg1 = GNUNET_strndup (gpg_fp, slen / 2); 207 gpg1 = GNUNET_strndup (gpg_fp, slen / 2);
214 gpg2 = GNUNET_strdup (&gpg_fp[slen / 2]); 208 gpg2 = GNUNET_strdup (&gpg_fp[slen / 2]);
215 FPRINTF (f, 209 FPRINTF (f, "\\def\\gpglineone{%s}\n\\def\\gpglinetwo{%s}\n", gpg1, gpg2);
216 "\\def\\gpglineone{%s}\n\\def\\gpglinetwo{%s}\n",
217 gpg1, gpg2);
218 GNUNET_free (gpg2); 210 GNUNET_free (gpg2);
219 GNUNET_free (gpg1); 211 GNUNET_free (gpg1);
220 } 212 }
@@ -223,25 +215,20 @@ access_handler_callback (void *cls,
223 gnskey, 215 gnskey,
224 (NULL == gns_nick) ? "" : gns_nick); 216 (NULL == gns_nick) ? "" : gns_nick);
225 FCLOSE (f); 217 FCLOSE (f);
226 GNUNET_asprintf (&p, 218 GNUNET_asprintf (
227 "cd %s; cp %s gns-bcd.tex | pdflatex --enable-write18 gns-bcd.tex > /dev/null 2> /dev/null", 219 &p,
228 tmp, 220 "cd %s; cp %s gns-bcd.tex | pdflatex --enable-write18 gns-bcd.tex > /dev/null 2> /dev/null",
229 resfile); 221 tmp,
222 resfile);
230 GNUNET_free (deffile); 223 GNUNET_free (deffile);
231 ret = system (p); 224 ret = system (p);
232 if (WIFSIGNALED (ret) || (0 != WEXITSTATUS(ret))) 225 if (WIFSIGNALED (ret) || (0 != WEXITSTATUS (ret)))
233 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 226 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "system", p);
234 "system", 227 GNUNET_asprintf (&deffile, "%s%s%s", tmp, DIR_SEPARATOR_STR, "gns-bcd.pdf");
235 p);
236 GNUNET_asprintf (&deffile,
237 "%s%s%s",
238 tmp, DIR_SEPARATOR_STR, "gns-bcd.pdf");
239 fd = OPEN (deffile, O_RDONLY); 228 fd = OPEN (deffile, O_RDONLY);
240 if (-1 == fd) 229 if (-1 == fd)
241 { 230 {
242 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 231 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", deffile);
243 "open",
244 deffile);
245 GNUNET_free (deffile); 232 GNUNET_free (deffile);
246 GNUNET_free (p); 233 GNUNET_free (p);
247 GNUNET_DISK_directory_remove (tmp); 234 GNUNET_DISK_directory_remove (tmp);
@@ -249,7 +236,8 @@ access_handler_callback (void *cls,
249 return MHD_NO; 236 return MHD_NO;
250 } 237 }
251 GNUNET_break (0 == STAT (deffile, &st)); 238 GNUNET_break (0 == STAT (deffile, &st));
252 if (NULL == (response = MHD_create_response_from_fd ((size_t) st.st_size, fd))) 239 if (NULL ==
240 (response = MHD_create_response_from_fd ((size_t) st.st_size, fd)))
253 { 241 {
254 GNUNET_break (0); 242 GNUNET_break (0);
255 GNUNET_break (0 == CLOSE (fd)); 243 GNUNET_break (0 == CLOSE (fd));
@@ -262,9 +250,7 @@ access_handler_callback (void *cls,
262 (void) MHD_add_response_header (response, 250 (void) MHD_add_response_header (response,
263 MHD_HTTP_HEADER_CONTENT_TYPE, 251 MHD_HTTP_HEADER_CONTENT_TYPE,
264 "application/pdf"); 252 "application/pdf");
265 ret = MHD_queue_response (connection, 253 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
266 MHD_HTTP_OK,
267 response);
268 MHD_destroy_response (response); 254 MHD_destroy_response (response);
269 GNUNET_free (deffile); 255 GNUNET_free (deffile);
270 GNUNET_free (p); 256 GNUNET_free (p);
@@ -308,7 +294,7 @@ run_daemon (void *cls)
308static struct GNUNET_SCHEDULER_Task * 294static struct GNUNET_SCHEDULER_Task *
309prepare_daemon (struct MHD_Daemon *daemon_handle) 295prepare_daemon (struct MHD_Daemon *daemon_handle)
310{ 296{
311 struct GNUNET_SCHEDULER_Task * ret; 297 struct GNUNET_SCHEDULER_Task *ret;
312 fd_set rs; 298 fd_set rs;
313 fd_set ws; 299 fd_set ws;
314 fd_set es; 300 fd_set es;
@@ -333,10 +319,12 @@ prepare_daemon (struct MHD_Daemon *daemon_handle)
333 tv = GNUNET_TIME_UNIT_FOREVER_REL; 319 tv = GNUNET_TIME_UNIT_FOREVER_REL;
334 GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); 320 GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1);
335 GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); 321 GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1);
336 ret = 322 ret = GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_HIGH,
337 GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_HIGH, 323 tv,
338 tv, wrs, wws, 324 wrs,
339 &run_daemon, daemon_handle); 325 wws,
326 &run_daemon,
327 daemon_handle);
340 GNUNET_NETWORK_fdset_destroy (wrs); 328 GNUNET_NETWORK_fdset_destroy (wrs);
341 GNUNET_NETWORK_fdset_destroy (wws); 329 GNUNET_NETWORK_fdset_destroy (wws);
342 return ret; 330 return ret;
@@ -351,29 +339,35 @@ prepare_daemon (struct MHD_Daemon *daemon_handle)
351static int 339static int
352server_start () 340server_start ()
353{ 341{
354 if (0 == port) 342 if (0 == port)
355 { 343 {
356 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 344 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
357 _("Invalid port number %u. Exiting.\n"), 345 _ ("Invalid port number %u. Exiting.\n"),
358 port); 346 port);
359 return GNUNET_SYSERR; 347 return GNUNET_SYSERR;
360 } 348 }
361 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 349 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
362 _("Businesscard HTTP server starts on %u\n"), 350 _ ("Businesscard HTTP server starts on %u\n"),
363 port); 351 port);
364 daemon_handle = MHD_start_daemon (MHD_USE_DUAL_STACK | MHD_USE_DEBUG, 352 daemon_handle = MHD_start_daemon (MHD_USE_DUAL_STACK | MHD_USE_DEBUG,
365 port, 353 port,
366 NULL /* accept_policy_callback */, NULL, 354 NULL /* accept_policy_callback */,
367 &access_handler_callback, NULL, 355 NULL,
368 MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 512, 356 &access_handler_callback,
369 MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 2, 357 NULL,
370 MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 60, 358 MHD_OPTION_CONNECTION_LIMIT,
371 MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (16 * 1024), 359 (unsigned int) 512,
360 MHD_OPTION_PER_IP_CONNECTION_LIMIT,
361 (unsigned int) 2,
362 MHD_OPTION_CONNECTION_TIMEOUT,
363 (unsigned int) 60,
364 MHD_OPTION_CONNECTION_MEMORY_LIMIT,
365 (size_t) (16 * 1024),
372 MHD_OPTION_END); 366 MHD_OPTION_END);
373 if (NULL == daemon_handle) 367 if (NULL == daemon_handle)
374 { 368 {
375 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 369 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
376 _("Could not start businesscard HTTP server on port %u\n"), 370 _ ("Could not start businesscard HTTP server on port %u\n"),
377 (unsigned int) port); 371 (unsigned int) port);
378 return GNUNET_SYSERR; 372 return GNUNET_SYSERR;
379 } 373 }
@@ -388,8 +382,8 @@ server_start ()
388static void 382static void
389server_stop (void *cls) 383server_stop (void *cls)
390{ 384{
391 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 385 (void) cls;
392 "HTTP server shutdown\n"); 386 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "HTTP server shutdown\n");
393 if (NULL != http_task) 387 if (NULL != http_task)
394 { 388 {
395 GNUNET_SCHEDULER_cancel (http_task); 389 GNUNET_SCHEDULER_cancel (http_task);
@@ -442,40 +436,32 @@ run (void *cls,
442 char *fn; 436 char *fn;
443 int fd; 437 int fd;
444 438
439 (void) cls;
440 (void) args;
441 (void) cfgfile;
445 cfg = c; 442 cfg = c;
446 dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); 443 dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR);
447 GNUNET_assert (NULL != dir); 444 GNUNET_assert (NULL != dir);
448 GNUNET_asprintf (&fn, 445 GNUNET_asprintf (&fn, "%s%s%s", dir, DIR_SEPARATOR_STR, "gns-bcd.html");
449 "%s%s%s", 446 GNUNET_asprintf (&resfile, "%s%s%s", dir, DIR_SEPARATOR_STR, "gns-bcd.tex");
450 dir,
451 DIR_SEPARATOR_STR,
452 "gns-bcd.html");
453 GNUNET_asprintf (&resfile,
454 "%s%s%s",
455 dir,
456 DIR_SEPARATOR_STR,
457 "gns-bcd.tex");
458 GNUNET_free (dir); 447 GNUNET_free (dir);
459 fd = OPEN (fn, O_RDONLY); 448 fd = OPEN (fn, O_RDONLY);
460 if (-1 == fd) 449 if (-1 == fd)
461 { 450 {
462 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 451 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", fn);
463 "open",
464 fn);
465 GNUNET_free (fn); 452 GNUNET_free (fn);
466 return; 453 return;
467 } 454 }
468 if (0 != STAT (fn, &st)) 455 if (0 != STAT (fn, &st))
469 { 456 {
470 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, 457 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", fn);
471 "open",
472 fn);
473 GNUNET_free (fn); 458 GNUNET_free (fn);
474 GNUNET_break (0 == CLOSE (fd)); 459 GNUNET_break (0 == CLOSE (fd));
475 return; 460 return;
476 } 461 }
477 GNUNET_free (fn); 462 GNUNET_free (fn);
478 if (NULL == (main_response = MHD_create_response_from_fd ((size_t) st.st_size, fd))) 463 if (NULL ==
464 (main_response = MHD_create_response_from_fd ((size_t) st.st_size, fd)))
479 { 465 {
480 GNUNET_break (0); 466 GNUNET_break (0);
481 GNUNET_break (0 == CLOSE (fd)); 467 GNUNET_break (0 == CLOSE (fd));
@@ -484,9 +470,10 @@ run (void *cls,
484 (void) MHD_add_response_header (main_response, 470 (void) MHD_add_response_header (main_response,
485 MHD_HTTP_HEADER_CONTENT_TYPE, 471 MHD_HTTP_HEADER_CONTENT_TYPE,
486 "text/html"); 472 "text/html");
487 invalid_gnskey_response = MHD_create_response_from_buffer (strlen (INVALID_GNSKEY), 473 invalid_gnskey_response =
488 INVALID_GNSKEY, 474 MHD_create_response_from_buffer (strlen (INVALID_GNSKEY),
489 MHD_RESPMEM_PERSISTENT); 475 INVALID_GNSKEY,
476 MHD_RESPMEM_PERSISTENT);
490 (void) MHD_add_response_header (invalid_gnskey_response, 477 (void) MHD_add_response_header (invalid_gnskey_response,
491 MHD_HTTP_HEADER_CONTENT_TYPE, 478 MHD_HTTP_HEADER_CONTENT_TYPE,
492 "text/html"); 479 "text/html");
@@ -496,12 +483,9 @@ run (void *cls,
496 (void) MHD_add_response_header (not_found_response, 483 (void) MHD_add_response_header (not_found_response,
497 MHD_HTTP_HEADER_CONTENT_TYPE, 484 MHD_HTTP_HEADER_CONTENT_TYPE,
498 "text/html"); 485 "text/html");
499 if (GNUNET_OK != 486 if (GNUNET_OK != server_start ())
500 server_start ())
501 return; 487 return;
502 GNUNET_SCHEDULER_add_shutdown (&server_stop, 488 GNUNET_SCHEDULER_add_shutdown (&server_stop, NULL);
503 NULL);
504 GNUNET_break (0 == CLOSE(fd));
505} 489}
506 490
507 491
@@ -518,25 +502,28 @@ main (int argc, char *const *argv)
518 struct GNUNET_GETOPT_CommandLineOption options[] = { 502 struct GNUNET_GETOPT_CommandLineOption options[] = {
519 503
520 GNUNET_GETOPT_option_uint16 ('p', 504 GNUNET_GETOPT_option_uint16 ('p',
521 "port", 505 "port",
522 "PORT", 506 "PORT",
523 gettext_noop ("Run HTTP serve on port PORT (default is 8888)"), 507 gettext_noop (
524 &port), 508 "Run HTTP serve on port PORT (default is 8888)"),
525 GNUNET_GETOPT_OPTION_END 509 &port),
526 }; 510 GNUNET_GETOPT_OPTION_END};
527 int ret; 511 int ret;
528 512
529 if (GNUNET_OK != 513 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
530 GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
531 return 2; 514 return 2;
532 GNUNET_log_setup ("gnunet-bcd", "WARNING", NULL); 515 GNUNET_log_setup ("gnunet-bcd", "WARNING", NULL);
533 ret = 516 ret = (GNUNET_OK ==
534 (GNUNET_OK == 517 GNUNET_PROGRAM_run (argc,
535 GNUNET_PROGRAM_run (argc, argv, "gnunet-bcd", 518 argv,
536 _("GNUnet HTTP server to create business cards"), 519 "gnunet-bcd",
537 options, 520 _ ("GNUnet HTTP server to create business cards"),
538 &run, NULL)) ? 0 : 1; 521 options,
539 GNUNET_free ((void*) argv); 522 &run,
523 NULL))
524 ? 0
525 : 1;
526 GNUNET_free ((void *) argv);
540 return ret; 527 return ret;
541} 528}
542 529