diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-12 15:12:42 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-12 15:12:42 +0200 |
commit | c3075f1807d794ab1fb8af4779a07f3f528ce84e (patch) | |
tree | 283b3a6cf42fa6b28d253891a57db5415ac0b971 /src | |
parent | 2d5d51340c15a78b3acb79314781758fdef61ab0 (diff) | |
download | gnunet-c3075f1807d794ab1fb8af4779a07f3f528ce84e.tar.gz gnunet-c3075f1807d794ab1fb8af4779a07f3f528ce84e.zip |
-fix
Diffstat (limited to 'src')
-rw-r--r-- | src/identity-provider/gnunet-idp.c | 2 | ||||
-rw-r--r-- | src/identity-provider/plugin_rest_identity_provider.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/identity-provider/gnunet-idp.c b/src/identity-provider/gnunet-idp.c index 0efe6eaa9..88136c124 100644 --- a/src/identity-provider/gnunet-idp.c +++ b/src/identity-provider/gnunet-idp.c | |||
@@ -247,7 +247,7 @@ iter_finished (void *cls) | |||
247 | attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name, | 247 | attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name, |
248 | GNUNET_IDENTITY_PROVIDER_AT_STRING, | 248 | GNUNET_IDENTITY_PROVIDER_AT_STRING, |
249 | attr_value, | 249 | attr_value, |
250 | strlen (attr_value)); | 250 | strlen (attr_value) + 1); |
251 | idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (idp_handle, | 251 | idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (idp_handle, |
252 | pkey, | 252 | pkey, |
253 | attr, | 253 | attr, |
diff --git a/src/identity-provider/plugin_rest_identity_provider.c b/src/identity-provider/plugin_rest_identity_provider.c index b6a8f3d36..f6039722f 100644 --- a/src/identity-provider/plugin_rest_identity_provider.c +++ b/src/identity-provider/plugin_rest_identity_provider.c | |||
@@ -599,7 +599,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
599 | attribute = GNUNET_IDENTITY_PROVIDER_attribute_new (name_str, | 599 | attribute = GNUNET_IDENTITY_PROVIDER_attribute_new (name_str, |
600 | GNUNET_IDENTITY_PROVIDER_AT_STRING, | 600 | GNUNET_IDENTITY_PROVIDER_AT_STRING, |
601 | value_str, | 601 | value_str, |
602 | strlen (value_str)); | 602 | strlen (value_str) + 1); |
603 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); | 603 | handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg); |
604 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (handle->idp, | 604 | handle->idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (handle->idp, |
605 | identity_priv, | 605 | identity_priv, |
@@ -624,6 +624,12 @@ attr_collect (void *cls, | |||
624 | struct GNUNET_JSONAPI_Resource *json_resource; | 624 | struct GNUNET_JSONAPI_Resource *json_resource; |
625 | struct RequestHandle *handle = cls; | 625 | struct RequestHandle *handle = cls; |
626 | json_t *value; | 626 | json_t *value; |
627 | |||
628 | if ((NULL == attr->name) || (NULL == attr->data)) | ||
629 | { | ||
630 | GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it); | ||
631 | return; | ||
632 | } | ||
627 | 633 | ||
628 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", | 634 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n", |
629 | attr->name); | 635 | attr->name); |