diff options
Diffstat (limited to 'src/identity-provider/gnunet-service-identity-provider.c')
-rw-r--r-- | src/identity-provider/gnunet-service-identity-provider.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/identity-provider/gnunet-service-identity-provider.c b/src/identity-provider/gnunet-service-identity-provider.c index 265719d58..523eebf39 100644 --- a/src/identity-provider/gnunet-service-identity-provider.c +++ b/src/identity-provider/gnunet-service-identity-provider.c | |||
@@ -1668,7 +1668,6 @@ process_consume_abe_key (void *cls, uint32_t rd_count, | |||
1668 | size_t size; | 1668 | size_t size; |
1669 | char *buf; | 1669 | char *buf; |
1670 | char *scope; | 1670 | char *scope; |
1671 | char *lookup_query; | ||
1672 | 1671 | ||
1673 | handle->lookup_request = NULL; | 1672 | handle->lookup_request = NULL; |
1674 | if (1 != rd_count) | 1673 | if (1 != rd_count) |
@@ -1720,18 +1719,15 @@ process_consume_abe_key (void *cls, uint32_t rd_count, | |||
1720 | 1719 | ||
1721 | for (scope = strtok (scopes, ","); NULL != scope; scope = strtok (NULL, ",")) | 1720 | for (scope = strtok (scopes, ","); NULL != scope; scope = strtok (NULL, ",")) |
1722 | { | 1721 | { |
1723 | GNUNET_asprintf (&lookup_query, | ||
1724 | "%s.gnu", | ||
1725 | scope); | ||
1726 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1722 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1727 | "Looking up %s\n", lookup_query); | 1723 | "Looking up %s\n", scope); |
1728 | parallel_lookup = GNUNET_new (struct ParallelLookup); | 1724 | parallel_lookup = GNUNET_new (struct ParallelLookup); |
1729 | parallel_lookup->handle = handle; | 1725 | parallel_lookup->handle = handle; |
1730 | parallel_lookup->label = GNUNET_strdup (scope); | 1726 | parallel_lookup->label = GNUNET_strdup (scope); |
1731 | parallel_lookup->lookup_start_time = GNUNET_TIME_absolute_get(); | 1727 | parallel_lookup->lookup_start_time = GNUNET_TIME_absolute_get(); |
1732 | parallel_lookup->lookup_request | 1728 | parallel_lookup->lookup_request |
1733 | = GNUNET_GNS_lookup (gns_handle, | 1729 | = GNUNET_GNS_lookup (gns_handle, |
1734 | lookup_query, | 1730 | scope, |
1735 | &handle->ticket.identity, | 1731 | &handle->ticket.identity, |
1736 | GNUNET_GNSRECORD_TYPE_ID_ATTR, | 1732 | GNUNET_GNSRECORD_TYPE_ID_ATTR, |
1737 | GNUNET_GNS_LO_DEFAULT, | 1733 | GNUNET_GNS_LO_DEFAULT, |
@@ -1740,7 +1736,7 @@ process_consume_abe_key (void *cls, uint32_t rd_count, | |||
1740 | GNUNET_CONTAINER_DLL_insert (handle->parallel_lookups_head, | 1736 | GNUNET_CONTAINER_DLL_insert (handle->parallel_lookups_head, |
1741 | handle->parallel_lookups_tail, | 1737 | handle->parallel_lookups_tail, |
1742 | parallel_lookup); | 1738 | parallel_lookup); |
1743 | GNUNET_free (lookup_query); | 1739 | GNUNET_free (scope); |
1744 | } | 1740 | } |
1745 | GNUNET_free (scopes); | 1741 | GNUNET_free (scopes); |
1746 | GNUNET_free (buf); | 1742 | GNUNET_free (buf); |
@@ -1756,7 +1752,6 @@ handle_consume_ticket_message (void *cls, | |||
1756 | { | 1752 | { |
1757 | struct ConsumeTicketHandle *ch; | 1753 | struct ConsumeTicketHandle *ch; |
1758 | struct IdpClient *idp = cls; | 1754 | struct IdpClient *idp = cls; |
1759 | char* lookup_query; | ||
1760 | char* rnd_label; | 1755 | char* rnd_label; |
1761 | 1756 | ||
1762 | ch = GNUNET_new (struct ConsumeTicketHandle); | 1757 | ch = GNUNET_new (struct ConsumeTicketHandle); |
@@ -1769,22 +1764,18 @@ handle_consume_ticket_message (void *cls, | |||
1769 | ch->ticket = *((struct GNUNET_IDENTITY_PROVIDER_Ticket*)&cm[1]); | 1764 | ch->ticket = *((struct GNUNET_IDENTITY_PROVIDER_Ticket*)&cm[1]); |
1770 | rnd_label = GNUNET_STRINGS_data_to_string_alloc (&ch->ticket.rnd, | 1765 | rnd_label = GNUNET_STRINGS_data_to_string_alloc (&ch->ticket.rnd, |
1771 | sizeof (uint64_t)); | 1766 | sizeof (uint64_t)); |
1772 | GNUNET_asprintf (&lookup_query, | ||
1773 | "%s.gnu", | ||
1774 | rnd_label); | ||
1775 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1767 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1776 | "Looking for ABE key under %s\n", lookup_query); | 1768 | "Looking for ABE key under %s\n", rnd_label); |
1777 | ch->lookup_start_time = GNUNET_TIME_absolute_get (); | 1769 | ch->lookup_start_time = GNUNET_TIME_absolute_get (); |
1778 | ch->lookup_request | 1770 | ch->lookup_request |
1779 | = GNUNET_GNS_lookup (gns_handle, | 1771 | = GNUNET_GNS_lookup (gns_handle, |
1780 | lookup_query, | 1772 | rnd_label, |
1781 | &ch->ticket.identity, | 1773 | &ch->ticket.identity, |
1782 | GNUNET_GNSRECORD_TYPE_ABE_KEY, | 1774 | GNUNET_GNSRECORD_TYPE_ABE_KEY, |
1783 | GNUNET_GNS_LO_DEFAULT, | 1775 | GNUNET_GNS_LO_DEFAULT, |
1784 | &process_consume_abe_key, | 1776 | &process_consume_abe_key, |
1785 | ch); | 1777 | ch); |
1786 | GNUNET_free (rnd_label); | 1778 | GNUNET_free (rnd_label); |
1787 | GNUNET_free (lookup_query); | ||
1788 | GNUNET_SERVICE_client_continue (idp->client); | 1779 | GNUNET_SERVICE_client_continue (idp->client); |
1789 | } | 1780 | } |
1790 | 1781 | ||