aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_rest_namestore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/plugin_rest_namestore.c')
-rw-r--r--src/namestore/plugin_rest_namestore.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index ff5494dc7..0475960eb 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -640,16 +640,14 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle,
640 handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); 640 handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego);
641 641
642 GNUNET_CRYPTO_hash ("record_type", strlen ("record_type"), &key); 642 GNUNET_CRYPTO_hash ("record_type", strlen ("record_type"), &key);
643 if (GNUNET_NO == 643 handle->record_type = GNUNET_GNSRECORD_TYPE_ANY;
644 if (GNUNET_YES ==
644 GNUNET_CONTAINER_multihashmap_contains (con_handle->url_param_map, &key)) 645 GNUNET_CONTAINER_multihashmap_contains (con_handle->url_param_map, &key))
645 { 646 {
646 handle->record_type = GNUNET_GNSRECORD_TYPE_ANY;
647 }
648 else
649 {
650 typename = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map, 647 typename = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map,
651 &key); 648 &key);
652 handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename); 649 if (NULL != typename)
650 handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename);
653 } 651 }
654 labelname = &egoname[strlen (ego_entry->identifier)]; 652 labelname = &egoname[strlen (ego_entry->identifier)];
655 // set zone to name if given 653 // set zone to name if given