diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:00:06 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:00:06 +0200 |
commit | 6a8ff6f7fe858899a2f6418691b01120323a10d4 (patch) | |
tree | 74ab688b9be16295e571897c387f02331d93b030 | |
parent | 86d974e61bb7be2541f3675913d0d3993bc19987 (diff) | |
download | gnunet-6a8ff6f7fe858899a2f6418691b01120323a10d4.tar.gz gnunet-6a8ff6f7fe858899a2f6418691b01120323a10d4.zip |
fix
-rw-r--r-- | src/reclaim/json_reclaim.c | 2 | ||||
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/reclaim/json_reclaim.c b/src/reclaim/json_reclaim.c index 222cf1dbf..557caafe2 100644 --- a/src/reclaim/json_reclaim.c +++ b/src/reclaim/json_reclaim.c | |||
@@ -171,7 +171,7 @@ parse_ticket (void *cls, json_t *root, struct GNUNET_JSON_Specification *spec) | |||
171 | &rnd_str, | 171 | &rnd_str, |
172 | "audience", | 172 | "audience", |
173 | &aud_str, | 173 | &aud_str, |
174 | "identity", | 174 | "issuer", |
175 | &id_str); | 175 | &id_str); |
176 | if (0 != unpack_state) | 176 | if (0 != unpack_state) |
177 | { | 177 | { |
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 7fe5283c4..9e57f4f46 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -719,15 +719,6 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
719 | GNUNET_memcpy (term_data, handle->rest_handle->data, | 719 | GNUNET_memcpy (term_data, handle->rest_handle->data, |
720 | handle->rest_handle->data_size); | 720 | handle->rest_handle->data_size); |
721 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); | 721 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); |
722 | GNUNET_assert (GNUNET_OK == | ||
723 | GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)); | ||
724 | json_decref (data_json); | ||
725 | if (NULL == ticket) { | ||
726 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", | ||
727 | term_data); | ||
728 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
729 | return; | ||
730 | } | ||
731 | if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) { | 722 | if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) { |
732 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); | 723 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); |
733 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 724 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
@@ -735,6 +726,13 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
735 | json_decref (data_json); | 726 | json_decref (data_json); |
736 | return; | 727 | return; |
737 | } | 728 | } |
729 | json_decref (data_json); | ||
730 | if (NULL == ticket) { | ||
731 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", | ||
732 | term_data); | ||
733 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
734 | return; | ||
735 | } | ||
738 | 736 | ||
739 | for (ego_entry = handle->ego_head; NULL != ego_entry; | 737 | for (ego_entry = handle->ego_head; NULL != ego_entry; |
740 | ego_entry = ego_entry->next) { | 738 | ego_entry = ego_entry->next) { |