diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-13 13:44:37 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-13 13:44:37 +0000 |
commit | eed977f3ddf01bb72b2b365badd2836fb7ae940c (patch) | |
tree | 7c5917ab5275bf87c2801dcf94aca9196bd18697 /src/rest | |
parent | 8aa21ee7de6c4a6cb9c1e132ab4218d3d10e0e30 (diff) |
-towards JSON API compat
Diffstat (limited to 'src/rest')
-rw-r--r-- | src/rest/gnunet-rest-server.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 4af7c458bb..1f909c58c3 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c @@ -220,11 +220,7 @@ url_iterator (void *cls, struct RestConnectionDataHandle *handle = cls; struct GNUNET_HashCode hkey; char *val; - if (NULL == handle->url_param_map) - { - handle->url_param_map = GNUNET_CONTAINER_multihashmap_create (16, - GNUNET_NO); - } + GNUNET_CRYPTO_hash (key, strlen (key), &hkey); GNUNET_asprintf (&val, "%s", value); if (GNUNET_OK != @@ -323,6 +319,8 @@ create_response (void *cls, rest_conndata_handle->url = url; rest_conndata_handle->data = upload_data; rest_conndata_handle->data_size = *upload_data_size; + rest_conndata_handle->url_param_map = GNUNET_CONTAINER_multihashmap_create (16, + GNUNET_NO); con_handle->data_handle = rest_conndata_handle; MHD_get_connection_values (con, MHD_GET_ARGUMENT_KIND, |