diff options
Diffstat (limited to 'src/escrow/gnunet-escrow.c')
-rw-r--r-- | src/escrow/gnunet-escrow.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/escrow/gnunet-escrow.c b/src/escrow/gnunet-escrow.c index 2f22fa194..2130b19fc 100644 --- a/src/escrow/gnunet-escrow.c +++ b/src/escrow/gnunet-escrow.c | |||
@@ -311,7 +311,6 @@ start_process () | |||
311 | { | 311 | { |
312 | escrow_op = GNUNET_ESCROW_get (escrow_handle, | 312 | escrow_op = GNUNET_ESCROW_get (escrow_handle, |
313 | anchor, | 313 | anchor, |
314 | method, | ||
315 | &get_cb, | 314 | &get_cb, |
316 | NULL); | 315 | NULL); |
317 | return; | 316 | return; |
@@ -390,8 +389,8 @@ run (void *cls, | |||
390 | 389 | ||
391 | ret = 0; | 390 | ret = 0; |
392 | 391 | ||
393 | /* check if method is set */ | 392 | /* check if method is set (needed for all operations except GET) */ |
394 | if (NULL == method_name) | 393 | if (NULL == method_name && GNUNET_YES != get_flag) |
395 | { | 394 | { |
396 | ret = 1; | 395 | ret = 1; |
397 | fprintf (stderr, _ ("Escrow method (-m option) is missing\n")); | 396 | fprintf (stderr, _ ("Escrow method (-m option) is missing\n")); |
@@ -457,13 +456,18 @@ run (void *cls, | |||
457 | } | 456 | } |
458 | 457 | ||
459 | /* determine method */ | 458 | /* determine method */ |
460 | method = GNUNET_ESCROW_method_string_to_number (method_name); | 459 | if (NULL != method_name) |
461 | if (GNUNET_ESCROW_KEY_NONE == method) | ||
462 | { | 460 | { |
463 | ret = 1; | 461 | method = GNUNET_ESCROW_method_string_to_number (method_name); |
464 | fprintf (stderr, _ ("unknown method name!\n")); | 462 | if (GNUNET_ESCROW_KEY_NONE == method) |
465 | return; | 463 | { |
464 | ret = 1; | ||
465 | fprintf (stderr, _ ("unknown method name!\n")); | ||
466 | return; | ||
467 | } | ||
466 | } | 468 | } |
469 | else // initialize to error value (should not be used in this case) | ||
470 | method = GNUNET_ESCROW_KEY_NONE; | ||
467 | 471 | ||
468 | escrow_handle = GNUNET_ESCROW_init (c); | 472 | escrow_handle = GNUNET_ESCROW_init (c); |
469 | 473 | ||