aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gns_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-08-13 17:48:54 +0000
committerChristian Grothoff <christian@grothoff.org>2013-08-13 17:48:54 +0000
commitbc7d219460d5ef0511164eb90039710940d905dd (patch)
treeacd96a93da163e17d3af3fe70c4e905e559fc84a /src/gns/gns_api.c
parent37070fdc2fb6fd36ccae94d93067b0bdb7ee9350 (diff)
downloadgnunet-bc7d219460d5ef0511164eb90039710940d905dd.tar.gz
gnunet-bc7d219460d5ef0511164eb90039710940d905dd.zip
-more work on simplified GNS API implementation
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r--src/gns/gns_api.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index 9bc85efea..6472018f8 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -489,7 +489,7 @@ GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle)
489 * @param lr the lookup request to cancel 489 * @param lr the lookup request to cancel
490 */ 490 */
491void 491void
492GNUNET_GNS_cancel_lookup_request (struct GNUNET_GNS_LookupRequest *lr) 492GNUNET_GNS_lookup_cancel (struct GNUNET_GNS_LookupRequest *lr)
493{ 493{
494 struct PendingMessage *p = (struct PendingMessage*) &lr[1]; 494 struct PendingMessage *p = (struct PendingMessage*) &lr[1];
495 495
@@ -519,14 +519,14 @@ GNUNET_GNS_cancel_lookup_request (struct GNUNET_GNS_LookupRequest *lr)
519 * @return handle to the get request 519 * @return handle to the get request
520 */ 520 */
521struct GNUNET_GNS_LookupRequest* 521struct GNUNET_GNS_LookupRequest*
522GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle, 522GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle,
523 const char *name, 523 const char *name,
524 struct GNUNET_CRYPTO_ShortHashCode *zone, 524 const struct GNUNET_CRYPTO_EccPublicKey *zone,
525 int type, 525 int type,
526 int only_cached, 526 int only_cached,
527 struct GNUNET_CRYPTO_EccPrivateKey *shorten_key, 527 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_key,
528 GNUNET_GNS_LookupResultProcessor proc, 528 GNUNET_GNS_LookupResultProcessor proc,
529 void *proc_cls) 529 void *proc_cls)
530{ 530{
531 /* IPC to shorten gns names, return shorten_handle */ 531 /* IPC to shorten gns names, return shorten_handle */
532 struct GNUNET_GNS_ClientLookupMessage *lookup_msg; 532 struct GNUNET_GNS_ClientLookupMessage *lookup_msg;
@@ -566,11 +566,7 @@ GNUNET_GNS_lookup_zone (struct GNUNET_GNS_Handle *handle,
566 lookup_msg->header.size = htons (msize); 566 lookup_msg->header.size = htons (msize);
567 lookup_msg->id = htonl (lr->r_id); 567 lookup_msg->id = htonl (lr->r_id);
568 lookup_msg->only_cached = htonl (only_cached); 568 lookup_msg->only_cached = htonl (only_cached);
569 if (NULL != zone) 569 lookup_msg->zone = *zone;
570 {
571 lookup_msg->have_zone = htonl (GNUNET_YES);
572 lookup_msg->zone = *zone;
573 }
574 lookup_msg->type = htonl (type); 570 lookup_msg->type = htonl (type);
575 if (NULL != shorten_key) 571 if (NULL != shorten_key)
576 { 572 {