diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-06-29 14:36:19 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-06-29 14:36:19 +0000 |
commit | e6d0c3119a3348eeb539a7e52113e12a7bb37a5f (patch) | |
tree | 87d6b6489ac64fc94b801391e5d6c8151f99a1f6 /src/gns/gns_api.c | |
parent | 33891883bf2fdd6430de2c5beded9aa5be151179 (diff) | |
download | gnunet-e6d0c3119a3348eeb539a7e52113e12a7bb37a5f.tar.gz gnunet-e6d0c3119a3348eeb539a7e52113e12a7bb37a5f.zip |
-fix 2447
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r-- | src/gns/gns_api.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 28d29f58a..ac7f87241 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -766,6 +766,8 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
766 | * | 766 | * |
767 | * @param handle handle to the GNS service | 767 | * @param handle handle to the GNS service |
768 | * @param name the name to look up | 768 | * @param name the name to look up |
769 | * @param private_zone the public zone of the private zone | ||
770 | * @param shorten_zone the public zone of the shorten zone | ||
769 | * @param zone the zone to start the resolution in | 771 | * @param zone the zone to start the resolution in |
770 | * @param proc function to call on result | 772 | * @param proc function to call on result |
771 | * @param proc_cls closure for processor | 773 | * @param proc_cls closure for processor |
@@ -773,10 +775,12 @@ GNUNET_GNS_lookup (struct GNUNET_GNS_Handle *handle, | |||
773 | */ | 775 | */ |
774 | struct GNUNET_GNS_QueueEntry * | 776 | struct GNUNET_GNS_QueueEntry * |
775 | GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle, | 777 | GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle, |
776 | const char * name, | 778 | const char * name, |
777 | struct GNUNET_CRYPTO_ShortHashCode *zone, | 779 | struct GNUNET_CRYPTO_ShortHashCode *private_zone, |
778 | GNUNET_GNS_ShortenResultProcessor proc, | 780 | struct GNUNET_CRYPTO_ShortHashCode *shorten_zone, |
779 | void *proc_cls) | 781 | struct GNUNET_CRYPTO_ShortHashCode *zone, |
782 | GNUNET_GNS_ShortenResultProcessor proc, | ||
783 | void *proc_cls) | ||
780 | { | 784 | { |
781 | /* IPC to shorten gns names, return shorten_handle */ | 785 | /* IPC to shorten gns names, return shorten_handle */ |
782 | struct GNUNET_GNS_ClientShortenMessage *shorten_msg; | 786 | struct GNUNET_GNS_ClientShortenMessage *shorten_msg; |
@@ -809,6 +813,8 @@ GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle, | |||
809 | shorten_msg->header.type = htons (GNUNET_MESSAGE_TYPE_GNS_SHORTEN); | 813 | shorten_msg->header.type = htons (GNUNET_MESSAGE_TYPE_GNS_SHORTEN); |
810 | shorten_msg->header.size = htons (msize); | 814 | shorten_msg->header.size = htons (msize); |
811 | shorten_msg->id = htonl(qe->r_id); | 815 | shorten_msg->id = htonl(qe->r_id); |
816 | shorten_msg->private_zone = *private_zone; | ||
817 | shorten_msg->shorten_zone = *shorten_zone; | ||
812 | 818 | ||
813 | if (NULL != zone) | 819 | if (NULL != zone) |
814 | { | 820 | { |
@@ -836,6 +842,8 @@ GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle, | |||
836 | * | 842 | * |
837 | * @param handle handle to the GNS service | 843 | * @param handle handle to the GNS service |
838 | * @param name the name to look up | 844 | * @param name the name to look up |
845 | * @param private_zone the public zone of the private zone | ||
846 | * @param shorten_zone the public zone of the shorten zone | ||
839 | * @param proc function to call on result | 847 | * @param proc function to call on result |
840 | * @param proc_cls closure for processor | 848 | * @param proc_cls closure for processor |
841 | * @return handle to the operation | 849 | * @return handle to the operation |
@@ -843,10 +851,14 @@ GNUNET_GNS_shorten_zone (struct GNUNET_GNS_Handle *handle, | |||
843 | struct GNUNET_GNS_QueueEntry * | 851 | struct GNUNET_GNS_QueueEntry * |
844 | GNUNET_GNS_shorten (struct GNUNET_GNS_Handle *handle, | 852 | GNUNET_GNS_shorten (struct GNUNET_GNS_Handle *handle, |
845 | const char * name, | 853 | const char * name, |
854 | struct GNUNET_CRYPTO_ShortHashCode *private_zone, | ||
855 | struct GNUNET_CRYPTO_ShortHashCode *shorten_zone, | ||
846 | GNUNET_GNS_ShortenResultProcessor proc, | 856 | GNUNET_GNS_ShortenResultProcessor proc, |
847 | void *proc_cls) | 857 | void *proc_cls) |
848 | { | 858 | { |
849 | return GNUNET_GNS_shorten_zone (handle, name, NULL, proc, proc_cls); | 859 | return GNUNET_GNS_shorten_zone (handle, name, |
860 | private_zone, shorten_zone, | ||
861 | NULL, proc, proc_cls); | ||
850 | } | 862 | } |
851 | /** | 863 | /** |
852 | * Perform an authority lookup for a given name. | 864 | * Perform an authority lookup for a given name. |