diff options
author | Markus Voggenreiter <Markus.Voggenreiter@tum.de> | 2019-11-02 15:42:09 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-01-13 13:31:04 +0100 |
commit | 554abc7d4c13e59a64d95770e68da8033de44c51 (patch) | |
tree | e9c89f63b182b966ce3e3a2dba3f79f16db26bb1 /src/reclaim/plugin_rest_reclaim.c | |
parent | 0688b167e707e1c60d1aa3c220bc6b99d60fd662 (diff) | |
download | gnunet-554abc7d4c13e59a64d95770e68da8033de44c51.tar.gz gnunet-554abc7d4c13e59a64d95770e68da8033de44c51.zip |
Prepared JWT Plugin
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 6a14132c4..dcf5d51b4 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -653,7 +653,6 @@ ref_collect (void *cls, | |||
653 | 653 | ||
654 | if ((NULL == reference->name) || (NULL == reference->reference_value)) | 654 | if ((NULL == reference->name) || (NULL == reference->reference_value)) |
655 | { | 655 | { |
656 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | ||
657 | return; | 656 | return; |
658 | } | 657 | } |
659 | 658 | ||
@@ -671,7 +670,6 @@ ref_collect (void *cls, | |||
671 | json_object_set_new (attr_obj, "ref_id", json_string (id_attest_str)); | 670 | json_object_set_new (attr_obj, "ref_id", json_string (id_attest_str)); |
672 | json_array_append (handle->resp_object, attr_obj); | 671 | json_array_append (handle->resp_object, attr_obj); |
673 | json_decref (attr_obj); | 672 | json_decref (attr_obj); |
674 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | ||
675 | } | 673 | } |
676 | 674 | ||
677 | /** | 675 | /** |
@@ -747,14 +745,25 @@ attest_collect (void *cls, | |||
747 | char *tmp_value; | 745 | char *tmp_value; |
748 | char *id_str; | 746 | char *id_str; |
749 | 747 | ||
748 | |||
749 | if (NULL != reference) | ||
750 | { | ||
751 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
752 | "Attestation Collection with Reference\n"); | ||
753 | return; | ||
754 | } | ||
750 | if (NULL == attest) | 755 | if (NULL == attest) |
751 | { | 756 | { |
757 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
758 | "Attestation Collection with empty Attestation\n"); | ||
752 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | 759 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
753 | return; | 760 | return; |
754 | } | 761 | } |
755 | 762 | ||
756 | if ((NULL == attest->name) || (NULL == attest->data)) | 763 | if ((NULL == attest->name) || (NULL == attest->data)) |
757 | { | 764 | { |
765 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
766 | "Attestation Collection with empty Name/Value\n"); | ||
758 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | 767 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
759 | return; | 768 | return; |
760 | } | 769 | } |
@@ -1174,9 +1183,10 @@ attr_collect (void *cls, | |||
1174 | const char *type; | 1183 | const char *type; |
1175 | char *id_str; | 1184 | char *id_str; |
1176 | 1185 | ||
1177 | if ((NULL == attr)&& (NULL == reference)) | 1186 | if ((NULL == attr) && (NULL == reference)) |
1178 | { | 1187 | { |
1179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Attribute Collection with empty Attribute/Reference\n"); | 1188 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1189 | "Attribute Collection with empty Attribute/Reference\n"); | ||
1180 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | 1190 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
1181 | return; | 1191 | return; |
1182 | } | 1192 | } |
@@ -1186,8 +1196,8 @@ attr_collect (void *cls, | |||
1186 | 1196 | ||
1187 | if ((NULL == reference->name) || (NULL == reference->reference_value)) | 1197 | if ((NULL == reference->name) || (NULL == reference->reference_value)) |
1188 | { | 1198 | { |
1189 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Attribute Collection with empty Reference Name/Value\n"); | 1199 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1190 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | 1200 | "Attribute Collection with empty Reference Name/Value\n"); |
1191 | return; | 1201 | return; |
1192 | } | 1202 | } |
1193 | 1203 | ||
@@ -1207,14 +1217,14 @@ attr_collect (void *cls, | |||
1207 | json_object_set_new (attr_obj, "type", json_string (type)); | 1217 | json_object_set_new (attr_obj, "type", json_string (type)); |
1208 | json_array_append (handle->resp_object, attr_obj); | 1218 | json_array_append (handle->resp_object, attr_obj); |
1209 | json_decref (attr_obj); | 1219 | json_decref (attr_obj); |
1210 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | ||
1211 | 1220 | ||
1212 | } | 1221 | } |
1213 | else | 1222 | else |
1214 | { | 1223 | { |
1215 | if ((NULL == attr->name) || (NULL == attr->data)) | 1224 | if ((NULL == attr->name) || (NULL == attr->data)) |
1216 | { | 1225 | { |
1217 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Attribute Collection with empty Attribute Name/Value\n"); | 1226 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1227 | "Attribute Collection with empty Attribute Name/Value\n"); | ||
1218 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); | 1228 | GNUNET_RECLAIM_get_attributes_next (handle->attr_it); |
1219 | return; | 1229 | return; |
1220 | } | 1230 | } |