diff options
Diffstat (limited to 'src/escrow/plugin_rest_escrow.c')
-rw-r--r-- | src/escrow/plugin_rest_escrow.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/escrow/plugin_rest_escrow.c b/src/escrow/plugin_rest_escrow.c index 917d0cdca..c5c4dbaf8 100644 --- a/src/escrow/plugin_rest_escrow.c +++ b/src/escrow/plugin_rest_escrow.c | |||
@@ -417,6 +417,7 @@ get_user_secret_from_payload (struct RequestHandle *handle) | |||
417 | if (0 >= handle->data_size) | 417 | if (0 >= handle->data_size) |
418 | { | 418 | { |
419 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); | 419 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); |
420 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
420 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 421 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
421 | return NULL; | 422 | return NULL; |
422 | } | 423 | } |
@@ -427,6 +428,7 @@ get_user_secret_from_payload (struct RequestHandle *handle) | |||
427 | if (NULL == json_data) | 428 | if (NULL == json_data) |
428 | { | 429 | { |
429 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); | 430 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); |
431 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
430 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 432 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
431 | json_decref (json_data); | 433 | json_decref (json_data); |
432 | return NULL; | 434 | return NULL; |
@@ -439,6 +441,7 @@ get_user_secret_from_payload (struct RequestHandle *handle) | |||
439 | if (0 != json_unpack_state) | 441 | if (0 != json_unpack_state) |
440 | { | 442 | { |
441 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 443 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
444 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
442 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 445 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
443 | json_decref (json_data); | 446 | json_decref (json_data); |
444 | return NULL; | 447 | return NULL; |
@@ -447,6 +450,7 @@ get_user_secret_from_payload (struct RequestHandle *handle) | |||
447 | if (NULL == user_secret) | 450 | if (NULL == user_secret) |
448 | { | 451 | { |
449 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 452 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
453 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
450 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 454 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
451 | json_decref (json_data); | 455 | json_decref (json_data); |
452 | return NULL; | 456 | return NULL; |
@@ -455,6 +459,7 @@ get_user_secret_from_payload (struct RequestHandle *handle) | |||
455 | { | 459 | { |
456 | json_decref (json_data); | 460 | json_decref (json_data); |
457 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 461 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
462 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
458 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 463 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
459 | return NULL; | 464 | return NULL; |
460 | } | 465 | } |
@@ -601,6 +606,7 @@ get_anchor_from_payload (struct RequestHandle *handle) | |||
601 | if (0 >= handle->data_size) | 606 | if (0 >= handle->data_size) |
602 | { | 607 | { |
603 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); | 608 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); |
609 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
604 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 610 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
605 | return NULL; | 611 | return NULL; |
606 | } | 612 | } |
@@ -611,6 +617,7 @@ get_anchor_from_payload (struct RequestHandle *handle) | |||
611 | if (NULL == json_data) | 617 | if (NULL == json_data) |
612 | { | 618 | { |
613 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); | 619 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_NO_DATA); |
620 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
614 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 621 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
615 | json_decref (json_data); | 622 | json_decref (json_data); |
616 | return NULL; | 623 | return NULL; |
@@ -623,6 +630,7 @@ get_anchor_from_payload (struct RequestHandle *handle) | |||
623 | if (0 != json_unpack_state) | 630 | if (0 != json_unpack_state) |
624 | { | 631 | { |
625 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 632 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
633 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
626 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 634 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
627 | json_decref (json_data); | 635 | json_decref (json_data); |
628 | return NULL; | 636 | return NULL; |
@@ -631,6 +639,7 @@ get_anchor_from_payload (struct RequestHandle *handle) | |||
631 | if (NULL == anchor_string) | 639 | if (NULL == anchor_string) |
632 | { | 640 | { |
633 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 641 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
642 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
634 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 643 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
635 | json_decref (json_data); | 644 | json_decref (json_data); |
636 | return NULL; | 645 | return NULL; |
@@ -639,6 +648,7 @@ get_anchor_from_payload (struct RequestHandle *handle) | |||
639 | { | 648 | { |
640 | json_decref (json_data); | 649 | json_decref (json_data); |
641 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); | 650 | handle->emsg = GNUNET_strdup (GNUNET_REST_ERROR_DATA_INVALID); |
651 | handle->response_code = MHD_HTTP_BAD_REQUEST; | ||
642 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 652 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
643 | return NULL; | 653 | return NULL; |
644 | } | 654 | } |