aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2015-03-26 17:03:19 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2015-03-26 17:03:19 +0000
commit6953069393619f01de19bcfa2041ca0072fb9532 (patch)
treee5b9c15b111fe4fcd0db5005949e87be414b4f82 /src
parent9cbff235e16bb2888aca2ba492f46bca9351142d (diff)
downloadgnunet-6953069393619f01de19bcfa2041ca0072fb9532.tar.gz
gnunet-6953069393619f01de19bcfa2041ca0072fb9532.zip
-fix
Diffstat (limited to 'src')
-rw-r--r--src/identity/plugin_rest_identity.c4
-rw-r--r--src/rest/rest.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 20e48aba9..181a21c12 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -37,8 +37,6 @@
37 37
38#define ID_REST_STATE_POST_INIT 1 38#define ID_REST_STATE_POST_INIT 1
39 39
40#define URL_PARAM_SUBSYS "service"
41
42#define GNUNET_REST_JSONAPI_IDENTITY_EGO "ego" 40#define GNUNET_REST_JSONAPI_IDENTITY_EGO "ego"
43 41
44#define GNUNET_REST_JSONAPI_IDENTITY_KEY "key" 42#define GNUNET_REST_JSONAPI_IDENTITY_KEY "key"
@@ -307,7 +305,7 @@ ego_info_response (struct RestConnectionDataHandle *con,
307 return; 305 return;
308 } 306 }
309 if ( (strlen (GNUNET_REST_API_NS_IDENTITY) == strlen (handle->url) )) { 307 if ( (strlen (GNUNET_REST_API_NS_IDENTITY) == strlen (handle->url) )) {
310 GNUNET_CRYPTO_hash (URL_PARAM_SUBSYS, strlen (URL_PARAM_SUBSYS), &key); 308 GNUNET_CRYPTO_hash (GNUNET_REST_JSONAPI_IDENTITY_SUBSYSTEM, strlen (GNUNET_REST_JSONAPI_IDENTITY_SUBSYSTEM), &key);
311 if ( GNUNET_YES == 309 if ( GNUNET_YES ==
312 GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map, 310 GNUNET_CONTAINER_multihashmap_contains (handle->conndata_handle->url_param_map,
313 &key) ) 311 &key) )
diff --git a/src/rest/rest.c b/src/rest/rest.c
index 225798db9..196fd4f88 100644
--- a/src/rest/rest.c
+++ b/src/rest/rest.c
@@ -347,7 +347,7 @@ GNUNET_REST_jsonapi_object_resource_add (struct JsonApiObject *resp,
347int 347int
348GNUNET_REST_jsonapi_object_resource_count (struct JsonApiObject *resp) 348GNUNET_REST_jsonapi_object_resource_count (struct JsonApiObject *resp)
349{ 349{
350 return resp->res_count++; 350 return resp->res_count;
351} 351}
352 352
353/** 353/**
@@ -412,7 +412,6 @@ GNUNET_REST_jsonapi_data_serialize (const struct JsonApiObject *resp,
412 return GNUNET_SYSERR; 412 return GNUNET_SYSERR;
413 413
414 root_json = json_object (); 414 root_json = json_object ();
415
416 if (1 == resp->res_count) 415 if (1 == resp->res_count)
417 { 416 {
418 json_object_set (root_json, GNUNET_REST_JSONAPI_KEY_DATA, resp->res_list_head->res_obj); 417 json_object_set (root_json, GNUNET_REST_JSONAPI_KEY_DATA, resp->res_list_head->res_obj);