diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-02-04 21:15:59 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-02-09 20:38:10 +0100 |
commit | ad342b7e0870185522c7dcb846e71029fcfda335 (patch) | |
tree | 22dfa48bc4334d6b381bdb76458eb4c078ff9ac6 /src/reclaim/gnunet-service-reclaim.c | |
parent | 55f6d26b7424d660c99bc89f3677b20294e87a27 (diff) | |
download | gnunet-ad342b7e0870185522c7dcb846e71029fcfda335.tar.gz gnunet-ad342b7e0870185522c7dcb846e71029fcfda335.zip |
add attestation API
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim.c | 337 |
1 files changed, 262 insertions, 75 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c index 15f9a8385..f6fd04eeb 100644 --- a/src/reclaim/gnunet-service-reclaim.c +++ b/src/reclaim/gnunet-service-reclaim.c | |||
@@ -90,17 +90,17 @@ struct TicketIteration | |||
90 | /** | 90 | /** |
91 | * An attribute iteration operation. | 91 | * An attribute iteration operation. |
92 | */ | 92 | */ |
93 | struct AttributeIterator | 93 | struct Iterator |
94 | { | 94 | { |
95 | /** | 95 | /** |
96 | * Next element in the DLL | 96 | * Next element in the DLL |
97 | */ | 97 | */ |
98 | struct AttributeIterator *next; | 98 | struct Iterator *next; |
99 | 99 | ||
100 | /** | 100 | /** |
101 | * Previous element in the DLL | 101 | * Previous element in the DLL |
102 | */ | 102 | */ |
103 | struct AttributeIterator *prev; | 103 | struct Iterator *prev; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * IDP client which intiated this zone iteration | 106 | * IDP client which intiated this zone iteration |
@@ -121,6 +121,11 @@ struct AttributeIterator | |||
121 | * The operation id fot the zone iteration in the response for the client | 121 | * The operation id fot the zone iteration in the response for the client |
122 | */ | 122 | */ |
123 | uint32_t request_id; | 123 | uint32_t request_id; |
124 | |||
125 | /** | ||
126 | * Context | ||
127 | */ | ||
128 | void *ctx; | ||
124 | }; | 129 | }; |
125 | 130 | ||
126 | 131 | ||
@@ -154,14 +159,28 @@ struct IdpClient | |||
154 | * Attribute iteration operations in | 159 | * Attribute iteration operations in |
155 | * progress initiated by this client | 160 | * progress initiated by this client |
156 | */ | 161 | */ |
157 | struct AttributeIterator *attr_iter_head; | 162 | struct Iterator *attr_iter_head; |
163 | |||
164 | /** | ||
165 | * Tail of the DLL of | ||
166 | * Attribute iteration operations | ||
167 | * in progress initiated by this client | ||
168 | */ | ||
169 | struct Iterator *attr_iter_tail; | ||
170 | |||
171 | /** | ||
172 | * Head of the DLL of | ||
173 | * Attribute iteration operations in | ||
174 | * progress initiated by this client | ||
175 | */ | ||
176 | struct Iterator *attest_iter_head; | ||
158 | 177 | ||
159 | /** | 178 | /** |
160 | * Tail of the DLL of | 179 | * Tail of the DLL of |
161 | * Attribute iteration operations | 180 | * Attribute iteration operations |
162 | * in progress initiated by this client | 181 | * in progress initiated by this client |
163 | */ | 182 | */ |
164 | struct AttributeIterator *attr_iter_tail; | 183 | struct Iterator *attest_iter_tail; |
165 | 184 | ||
166 | /** | 185 | /** |
167 | * Head of DLL of ticket iteration ops | 186 | * Head of DLL of ticket iteration ops |
@@ -512,7 +531,7 @@ cleanup_as_handle (struct AttributeStoreHandle *ash) | |||
512 | static void | 531 | static void |
513 | cleanup_client (struct IdpClient *idp) | 532 | cleanup_client (struct IdpClient *idp) |
514 | { | 533 | { |
515 | struct AttributeIterator *ai; | 534 | struct Iterator *ai; |
516 | struct TicketIteration *ti; | 535 | struct TicketIteration *ti; |
517 | struct TicketRevocationOperation *rop; | 536 | struct TicketRevocationOperation *rop; |
518 | struct TicketIssueOperation *iss; | 537 | struct TicketIssueOperation *iss; |
@@ -550,6 +569,13 @@ cleanup_client (struct IdpClient *idp) | |||
550 | GNUNET_CONTAINER_DLL_remove (idp->attr_iter_head, idp->attr_iter_tail, ai); | 569 | GNUNET_CONTAINER_DLL_remove (idp->attr_iter_head, idp->attr_iter_tail, ai); |
551 | GNUNET_free (ai); | 570 | GNUNET_free (ai); |
552 | } | 571 | } |
572 | while (NULL != (ai = idp->attest_iter_head)) | ||
573 | { | ||
574 | GNUNET_CONTAINER_DLL_remove (idp->attest_iter_head, idp->attest_iter_tail, | ||
575 | ai); | ||
576 | GNUNET_free (ai); | ||
577 | } | ||
578 | |||
553 | while (NULL != (rop = idp->revoke_op_head)) | 579 | while (NULL != (rop = idp->revoke_op_head)) |
554 | { | 580 | { |
555 | GNUNET_CONTAINER_DLL_remove (idp->revoke_op_head, idp->revoke_op_tail, rop); | 581 | GNUNET_CONTAINER_DLL_remove (idp->revoke_op_head, idp->revoke_op_tail, rop); |
@@ -1641,7 +1667,7 @@ handle_attestation_delete_message (void *cls, | |||
1641 | static void | 1667 | static void |
1642 | attr_iter_finished (void *cls) | 1668 | attr_iter_finished (void *cls) |
1643 | { | 1669 | { |
1644 | struct AttributeIterator *ai = cls; | 1670 | struct Iterator *ai = cls; |
1645 | struct GNUNET_MQ_Envelope *env; | 1671 | struct GNUNET_MQ_Envelope *env; |
1646 | struct AttributeResultMessage *arm; | 1672 | struct AttributeResultMessage *arm; |
1647 | 1673 | ||
@@ -1665,7 +1691,7 @@ attr_iter_finished (void *cls) | |||
1665 | static void | 1691 | static void |
1666 | attr_iter_error (void *cls) | 1692 | attr_iter_error (void *cls) |
1667 | { | 1693 | { |
1668 | struct AttributeIterator *ai = cls; | 1694 | struct Iterator *ai = cls; |
1669 | 1695 | ||
1670 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to iterate over attributes\n"); | 1696 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to iterate over attributes\n"); |
1671 | attr_iter_finished (ai); | 1697 | attr_iter_finished (ai); |
@@ -1688,7 +1714,7 @@ attr_iter_cb (void *cls, | |||
1688 | unsigned int rd_count, | 1714 | unsigned int rd_count, |
1689 | const struct GNUNET_GNSRECORD_Data *rd) | 1715 | const struct GNUNET_GNSRECORD_Data *rd) |
1690 | { | 1716 | { |
1691 | struct AttributeIterator *ai = cls; | 1717 | struct Iterator *ai = cls; |
1692 | struct GNUNET_MQ_Envelope *env; | 1718 | struct GNUNET_MQ_Envelope *env; |
1693 | char *data_tmp; | 1719 | char *data_tmp; |
1694 | 1720 | ||
@@ -1697,71 +1723,25 @@ attr_iter_cb (void *cls, | |||
1697 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | 1723 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); |
1698 | return; | 1724 | return; |
1699 | } | 1725 | } |
1700 | if (rd_count > 1) | ||
1701 | { | ||
1702 | if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE_REF == rd[0].record_type) | ||
1703 | { | ||
1704 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1705 | "Found Ticket. Ignoring.\n"); | ||
1706 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | ||
1707 | return; | ||
1708 | } | ||
1709 | else if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd[0].record_type) | ||
1710 | { | ||
1711 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
1712 | "Non-Attestation record with multiple entries found: %u\n", | ||
1713 | rd[0].record_type); | ||
1714 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | ||
1715 | return; | ||
1716 | } | ||
1717 | } | ||
1718 | 1726 | ||
1719 | for (int i = 0; i<rd_count; i++) | 1727 | for (int i = 0; i<rd_count; i++) |
1720 | { | 1728 | { |
1721 | if ((GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE != rd[i].record_type) && | 1729 | if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE != rd[i].record_type) |
1722 | (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd[i].record_type)) | 1730 | continue; |
1723 | { | 1731 | struct AttributeResultMessage *arm; |
1724 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | 1732 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", |
1725 | return; | 1733 | label); |
1726 | } | 1734 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1727 | // FIXME Send attribute TOGETHER with respective attestation if applicable | 1735 | "Sending ATTRIBUTE_RESULT message\n"); |
1728 | if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTRIBUTE == rd[i].record_type) | 1736 | env = GNUNET_MQ_msg_extra (arm, |
1729 | { | 1737 | rd[i].data_size, |
1730 | struct AttributeResultMessage *arm; | 1738 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); |
1731 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attribute under: %s\n", | 1739 | arm->id = htonl (ai->request_id); |
1732 | label); | 1740 | arm->attr_len = htons (rd[i].data_size); |
1733 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1741 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity); |
1734 | "Sending ATTRIBUTE_RESULT message\n"); | 1742 | data_tmp = (char *) &arm[1]; |
1735 | env = GNUNET_MQ_msg_extra (arm, | 1743 | GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size); |
1736 | rd[i].data_size, | 1744 | GNUNET_MQ_send (ai->client->mq, env); |
1737 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); | ||
1738 | arm->id = htonl (ai->request_id); | ||
1739 | arm->attr_len = htons (rd[i].data_size); | ||
1740 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity); | ||
1741 | data_tmp = (char *) &arm[1]; | ||
1742 | GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size); | ||
1743 | GNUNET_MQ_send (ai->client->mq, env); | ||
1744 | } | ||
1745 | else | ||
1746 | { | ||
1747 | if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION == rd[i].record_type) | ||
1748 | { | ||
1749 | struct AttributeResultMessage *arm; | ||
1750 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n", | ||
1751 | label); | ||
1752 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1753 | "Sending ATTESTATION_RESULT message\n"); | ||
1754 | env = GNUNET_MQ_msg_extra (arm, | ||
1755 | rd[i].data_size, | ||
1756 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT); | ||
1757 | arm->id = htonl (ai->request_id); | ||
1758 | arm->attr_len = htons (rd[i].data_size); | ||
1759 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity); | ||
1760 | data_tmp = (char *) &arm[1]; | ||
1761 | GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size); | ||
1762 | GNUNET_MQ_send (ai->client->mq, env); | ||
1763 | } | ||
1764 | } | ||
1765 | } | 1745 | } |
1766 | } | 1746 | } |
1767 | 1747 | ||
@@ -1777,11 +1757,11 @@ handle_iteration_start (void *cls, | |||
1777 | const struct AttributeIterationStartMessage *ais_msg) | 1757 | const struct AttributeIterationStartMessage *ais_msg) |
1778 | { | 1758 | { |
1779 | struct IdpClient *idp = cls; | 1759 | struct IdpClient *idp = cls; |
1780 | struct AttributeIterator *ai; | 1760 | struct Iterator *ai; |
1781 | 1761 | ||
1782 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1762 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1783 | "Received ATTRIBUTE_ITERATION_START message\n"); | 1763 | "Received ATTRIBUTE_ITERATION_START message\n"); |
1784 | ai = GNUNET_new (struct AttributeIterator); | 1764 | ai = GNUNET_new (struct Iterator); |
1785 | ai->request_id = ntohl (ais_msg->id); | 1765 | ai->request_id = ntohl (ais_msg->id); |
1786 | ai->client = idp; | 1766 | ai->client = idp; |
1787 | ai->identity = ais_msg->identity; | 1767 | ai->identity = ais_msg->identity; |
@@ -1810,7 +1790,7 @@ handle_iteration_stop (void *cls, | |||
1810 | const struct AttributeIterationStopMessage *ais_msg) | 1790 | const struct AttributeIterationStopMessage *ais_msg) |
1811 | { | 1791 | { |
1812 | struct IdpClient *idp = cls; | 1792 | struct IdpClient *idp = cls; |
1813 | struct AttributeIterator *ai; | 1793 | struct Iterator *ai; |
1814 | uint32_t rid; | 1794 | uint32_t rid; |
1815 | 1795 | ||
1816 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1796 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1843,7 +1823,7 @@ handle_iteration_next (void *cls, | |||
1843 | const struct AttributeIterationNextMessage *ais_msg) | 1823 | const struct AttributeIterationNextMessage *ais_msg) |
1844 | { | 1824 | { |
1845 | struct IdpClient *idp = cls; | 1825 | struct IdpClient *idp = cls; |
1846 | struct AttributeIterator *ai; | 1826 | struct Iterator *ai; |
1847 | uint32_t rid; | 1827 | uint32_t rid; |
1848 | 1828 | ||
1849 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1829 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -1863,6 +1843,200 @@ handle_iteration_next (void *cls, | |||
1863 | } | 1843 | } |
1864 | 1844 | ||
1865 | 1845 | ||
1846 | /************************************************* | ||
1847 | * Attestation iteration | ||
1848 | *************************************************/ | ||
1849 | |||
1850 | |||
1851 | /** | ||
1852 | * Done iterating over attestations | ||
1853 | * | ||
1854 | * @param cls our iterator handle | ||
1855 | */ | ||
1856 | static void | ||
1857 | attest_iter_finished (void *cls) | ||
1858 | { | ||
1859 | struct Iterator *ai = cls; | ||
1860 | struct GNUNET_MQ_Envelope *env; | ||
1861 | struct AttestationResultMessage *arm; | ||
1862 | |||
1863 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTESTATION_RESULT message\n"); | ||
1864 | env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT); | ||
1865 | arm->id = htonl (ai->request_id); | ||
1866 | arm->attestation_len = htons (0); | ||
1867 | GNUNET_MQ_send (ai->client->mq, env); | ||
1868 | GNUNET_CONTAINER_DLL_remove (ai->client->attest_iter_head, | ||
1869 | ai->client->attest_iter_tail, | ||
1870 | ai); | ||
1871 | GNUNET_free (ai); | ||
1872 | } | ||
1873 | |||
1874 | |||
1875 | /** | ||
1876 | * Error iterating over attestations. Abort. | ||
1877 | * | ||
1878 | * @param cls our attribute iteration handle | ||
1879 | */ | ||
1880 | static void | ||
1881 | attest_iter_error (void *cls) | ||
1882 | { | ||
1883 | struct Iterator *ai = cls; | ||
1884 | |||
1885 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Failed to iterate over attestations\n"); | ||
1886 | attest_iter_finished (ai); | ||
1887 | } | ||
1888 | |||
1889 | |||
1890 | /** | ||
1891 | * Got record. Return attestation. | ||
1892 | * | ||
1893 | * @param cls our attribute iterator | ||
1894 | * @param zone zone we are iterating | ||
1895 | * @param label label of the records | ||
1896 | * @param rd_count record count | ||
1897 | * @param rd records | ||
1898 | */ | ||
1899 | static void | ||
1900 | attest_iter_cb (void *cls, | ||
1901 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | ||
1902 | const char *label, | ||
1903 | unsigned int rd_count, | ||
1904 | const struct GNUNET_GNSRECORD_Data *rd) | ||
1905 | { | ||
1906 | struct Iterator *ai = cls; | ||
1907 | struct GNUNET_MQ_Envelope *env; | ||
1908 | char *data_tmp; | ||
1909 | |||
1910 | if (rd_count == 0) | ||
1911 | { | ||
1912 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | ||
1913 | return; | ||
1914 | } | ||
1915 | |||
1916 | for (int i = 0; i<rd_count; i++) | ||
1917 | { | ||
1918 | if (GNUNET_GNSRECORD_TYPE_RECLAIM_ATTESTATION != rd[i].record_type) | ||
1919 | continue; | ||
1920 | struct AttestationResultMessage *arm; | ||
1921 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found attestation under: %s\n", | ||
1922 | label); | ||
1923 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1924 | "Sending ATTESTATION_RESULT message\n"); | ||
1925 | env = GNUNET_MQ_msg_extra (arm, | ||
1926 | rd[i].data_size, | ||
1927 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_RESULT); | ||
1928 | arm->id = htonl (ai->request_id); | ||
1929 | arm->attestation_len = htons (rd[i].data_size); | ||
1930 | GNUNET_CRYPTO_ecdsa_key_get_public (zone, &arm->identity); | ||
1931 | data_tmp = (char *) &arm[1]; | ||
1932 | GNUNET_memcpy (data_tmp, rd[i].data, rd[i].data_size); | ||
1933 | GNUNET_MQ_send (ai->client->mq, env); | ||
1934 | } | ||
1935 | } | ||
1936 | |||
1937 | |||
1938 | /** | ||
1939 | * Iterate over zone to get attributes | ||
1940 | * | ||
1941 | * @param cls our client | ||
1942 | * @param ais_msg the iteration message to start | ||
1943 | */ | ||
1944 | static void | ||
1945 | handle_attestation_iteration_start (void *cls, | ||
1946 | const struct | ||
1947 | AttestationIterationStartMessage *ais_msg) | ||
1948 | { | ||
1949 | struct IdpClient *idp = cls; | ||
1950 | struct Iterator *ai; | ||
1951 | |||
1952 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1953 | "Received ATTESTATION_ITERATION_START message\n"); | ||
1954 | ai = GNUNET_new (struct Iterator); | ||
1955 | ai->request_id = ntohl (ais_msg->id); | ||
1956 | ai->client = idp; | ||
1957 | ai->identity = ais_msg->identity; | ||
1958 | |||
1959 | GNUNET_CONTAINER_DLL_insert (idp->attest_iter_head, idp->attest_iter_tail, | ||
1960 | ai); | ||
1961 | ai->ns_it = GNUNET_NAMESTORE_zone_iteration_start (nsh, | ||
1962 | &ai->identity, | ||
1963 | &attest_iter_error, | ||
1964 | ai, | ||
1965 | &attest_iter_cb, | ||
1966 | ai, | ||
1967 | &attest_iter_finished, | ||
1968 | ai); | ||
1969 | GNUNET_SERVICE_client_continue (idp->client); | ||
1970 | } | ||
1971 | |||
1972 | |||
1973 | /** | ||
1974 | * Handle iteration stop message from client | ||
1975 | * | ||
1976 | * @param cls the client | ||
1977 | * @param ais_msg the stop message | ||
1978 | */ | ||
1979 | static void | ||
1980 | handle_attestation_iteration_stop (void *cls, | ||
1981 | const struct | ||
1982 | AttestationIterationStopMessage *ais_msg) | ||
1983 | { | ||
1984 | struct IdpClient *idp = cls; | ||
1985 | struct Iterator *ai; | ||
1986 | uint32_t rid; | ||
1987 | |||
1988 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1989 | "Received `%s' message\n", | ||
1990 | "ATTESTATION_ITERATION_STOP"); | ||
1991 | rid = ntohl (ais_msg->id); | ||
1992 | for (ai = idp->attest_iter_head; NULL != ai; ai = ai->next) | ||
1993 | if (ai->request_id == rid) | ||
1994 | break; | ||
1995 | if (NULL == ai) | ||
1996 | { | ||
1997 | GNUNET_break (0); | ||
1998 | GNUNET_SERVICE_client_drop (idp->client); | ||
1999 | return; | ||
2000 | } | ||
2001 | GNUNET_CONTAINER_DLL_remove (idp->attest_iter_head, idp->attest_iter_tail, | ||
2002 | ai); | ||
2003 | GNUNET_free (ai); | ||
2004 | GNUNET_SERVICE_client_continue (idp->client); | ||
2005 | } | ||
2006 | |||
2007 | |||
2008 | /** | ||
2009 | * Client requests next attestation from iterator | ||
2010 | * | ||
2011 | * @param cls the client | ||
2012 | * @param ais_msg the message | ||
2013 | */ | ||
2014 | static void | ||
2015 | handle_attestation_iteration_next (void *cls, | ||
2016 | const struct | ||
2017 | AttestationIterationNextMessage *ais_msg) | ||
2018 | { | ||
2019 | struct IdpClient *idp = cls; | ||
2020 | struct Iterator *ai; | ||
2021 | uint32_t rid; | ||
2022 | |||
2023 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2024 | "Received ATTESTATION_ITERATION_NEXT message\n"); | ||
2025 | rid = ntohl (ais_msg->id); | ||
2026 | for (ai = idp->attest_iter_head; NULL != ai; ai = ai->next) | ||
2027 | if (ai->request_id == rid) | ||
2028 | break; | ||
2029 | if (NULL == ai) | ||
2030 | { | ||
2031 | GNUNET_break (0); | ||
2032 | GNUNET_SERVICE_client_drop (idp->client); | ||
2033 | return; | ||
2034 | } | ||
2035 | GNUNET_NAMESTORE_zone_iterator_next (ai->ns_it, 1); | ||
2036 | GNUNET_SERVICE_client_continue (idp->client); | ||
2037 | } | ||
2038 | |||
2039 | |||
1866 | /****************************************************** | 2040 | /****************************************************** |
1867 | * Ticket iteration | 2041 | * Ticket iteration |
1868 | ******************************************************/ | 2042 | ******************************************************/ |
@@ -2115,6 +2289,19 @@ GNUNET_SERVICE_MAIN ( | |||
2115 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP, | 2289 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_ITERATION_STOP, |
2116 | struct AttributeIterationStopMessage, | 2290 | struct AttributeIterationStopMessage, |
2117 | NULL), | 2291 | NULL), |
2292 | GNUNET_MQ_hd_fixed_size (attestation_iteration_start, | ||
2293 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_START, | ||
2294 | struct AttestationIterationStartMessage, | ||
2295 | NULL), | ||
2296 | GNUNET_MQ_hd_fixed_size (attestation_iteration_next, | ||
2297 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_NEXT, | ||
2298 | struct AttestationIterationNextMessage, | ||
2299 | NULL), | ||
2300 | GNUNET_MQ_hd_fixed_size (attestation_iteration_stop, | ||
2301 | GNUNET_MESSAGE_TYPE_RECLAIM_ATTESTATION_ITERATION_STOP, | ||
2302 | struct AttestationIterationStopMessage, | ||
2303 | NULL), | ||
2304 | |||
2118 | GNUNET_MQ_hd_var_size (issue_ticket_message, | 2305 | GNUNET_MQ_hd_var_size (issue_ticket_message, |
2119 | GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET, | 2306 | GNUNET_MESSAGE_TYPE_RECLAIM_ISSUE_TICKET, |
2120 | struct IssueTicketMessage, | 2307 | struct IssueTicketMessage, |