diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2018-10-13 22:21:05 +0900 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2018-10-13 22:21:05 +0900 |
commit | ec105da10b0e8280e74fc0dc03b9c5973897d372 (patch) | |
tree | c1a17db78a07383c136972b945259d88dd0cd1af /src/namestore | |
parent | 96e59140512fec897270b27469fce776a5736149 (diff) | |
download | gnunet-ec105da10b0e8280e74fc0dc03b9c5973897d372.tar.gz gnunet-ec105da10b0e8280e74fc0dc03b9c5973897d372.zip |
fix broken zone iteration
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 163 | ||||
-rw-r--r-- | src/namestore/plugin_namestore_sqlite.c | 7 |
2 files changed, 88 insertions, 82 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index acb6a745a..cdefd0be9 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -713,7 +713,9 @@ send_store_response (struct NamestoreClient *nc, | |||
713 | { | 713 | { |
714 | struct GNUNET_MQ_Envelope *env; | 714 | struct GNUNET_MQ_Envelope *env; |
715 | struct RecordStoreResponseMessage *rcr_msg; | 715 | struct RecordStoreResponseMessage *rcr_msg; |
716 | 716 | ||
717 | if (NULL == nc) | ||
718 | return; | ||
717 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 719 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
718 | "Sending RECORD_STORE_RESPONSE message\n"); | 720 | "Sending RECORD_STORE_RESPONSE message\n"); |
719 | GNUNET_STATISTICS_update (statistics, | 721 | GNUNET_STATISTICS_update (statistics, |
@@ -1694,11 +1696,13 @@ zone_iterate_proc (void *cls, | |||
1694 | proc->limit--; | 1696 | proc->limit--; |
1695 | proc->zi->seq = seq; | 1697 | proc->zi->seq = seq; |
1696 | send_lookup_response (proc->zi->nc, | 1698 | send_lookup_response (proc->zi->nc, |
1697 | proc->zi->request_id, | 1699 | proc->zi->request_id, |
1698 | zone_key, | 1700 | zone_key, |
1699 | name, | 1701 | name, |
1700 | rd_count, | 1702 | rd_count, |
1701 | rd); | 1703 | rd); |
1704 | |||
1705 | |||
1702 | do_refresh_block = GNUNET_NO; | 1706 | do_refresh_block = GNUNET_NO; |
1703 | for (unsigned int i=0;i<rd_count;i++) | 1707 | for (unsigned int i=0;i<rd_count;i++) |
1704 | if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) | 1708 | if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)) |
@@ -1708,7 +1712,7 @@ zone_iterate_proc (void *cls, | |||
1708 | } | 1712 | } |
1709 | if (GNUNET_YES == do_refresh_block) | 1713 | if (GNUNET_YES == do_refresh_block) |
1710 | refresh_block (NULL, | 1714 | refresh_block (NULL, |
1711 | 0, | 1715 | 0, |
1712 | zone_key, | 1716 | zone_key, |
1713 | name, | 1717 | name, |
1714 | rd_count, | 1718 | rd_count, |
@@ -1764,23 +1768,23 @@ run_zone_iteration_round (struct ZoneIteration *zi, | |||
1764 | { | 1768 | { |
1765 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1769 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1766 | "Returned %llu results, more results available\n", | 1770 | "Returned %llu results, more results available\n", |
1767 | (unsigned long long) limit); | 1771 | (unsigned long long) limit); |
1768 | return; /* more results later after we get the | 1772 | return; /* more results later after we get the |
1769 | #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT message */ | 1773 | #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT message */ |
1770 | } | 1774 | } |
1771 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1775 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1772 | "Completed iteration after %llu/%llu results\n", | 1776 | "Completed iteration after %llu/%llu results\n", |
1773 | (unsigned long long) (limit - proc.limit), | 1777 | (unsigned long long) (limit - proc.limit), |
1774 | (unsigned long long) limit); | 1778 | (unsigned long long) limit); |
1775 | /* send empty response to indicate end of list */ | 1779 | /* send empty response to indicate end of list */ |
1776 | env = GNUNET_MQ_msg (rrm, | 1780 | env = GNUNET_MQ_msg (rrm, |
1777 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT); | 1781 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT); |
1778 | rrm->gns_header.r_id = htonl (zi->request_id); | 1782 | rrm->gns_header.r_id = htonl (zi->request_id); |
1779 | GNUNET_MQ_send (zi->nc->mq, | 1783 | GNUNET_MQ_send (zi->nc->mq, |
1780 | env); | 1784 | env); |
1781 | GNUNET_CONTAINER_DLL_remove (zi->nc->op_head, | 1785 | GNUNET_CONTAINER_DLL_remove (zi->nc->op_head, |
1782 | zi->nc->op_tail, | 1786 | zi->nc->op_tail, |
1783 | zi); | 1787 | zi); |
1784 | GNUNET_free (zi); | 1788 | GNUNET_free (zi); |
1785 | } | 1789 | } |
1786 | 1790 | ||
@@ -1793,22 +1797,23 @@ run_zone_iteration_round (struct ZoneIteration *zi, | |||
1793 | */ | 1797 | */ |
1794 | static void | 1798 | static void |
1795 | handle_iteration_start (void *cls, | 1799 | handle_iteration_start (void *cls, |
1796 | const struct ZoneIterationStartMessage *zis_msg) | 1800 | const struct ZoneIterationStartMessage *zis_msg) |
1797 | { | 1801 | { |
1798 | struct NamestoreClient *nc = cls; | 1802 | struct NamestoreClient *nc = cls; |
1799 | struct ZoneIteration *zi; | 1803 | struct ZoneIteration *zi; |
1800 | 1804 | ||
1801 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1805 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1802 | "Received ZONE_ITERATION_START message\n"); | 1806 | "Received ZONE_ITERATION_START message\n"); |
1803 | zi = GNUNET_new (struct ZoneIteration); | 1807 | zi = GNUNET_new (struct ZoneIteration); |
1804 | zi->request_id = ntohl (zis_msg->gns_header.r_id); | 1808 | zi->request_id = ntohl (zis_msg->gns_header.r_id); |
1805 | zi->offset = 0; | 1809 | zi->offset = 0; |
1806 | zi->nc = nc; | 1810 | zi->nc = nc; |
1811 | zi->seq = 1; | ||
1807 | zi->zone = zis_msg->zone; | 1812 | zi->zone = zis_msg->zone; |
1808 | 1813 | ||
1809 | GNUNET_CONTAINER_DLL_insert (nc->op_head, | 1814 | GNUNET_CONTAINER_DLL_insert (nc->op_head, |
1810 | nc->op_tail, | 1815 | nc->op_tail, |
1811 | zi); | 1816 | zi); |
1812 | run_zone_iteration_round (zi, | 1817 | run_zone_iteration_round (zi, |
1813 | 1); | 1818 | 1); |
1814 | GNUNET_SERVICE_client_continue (nc->client); | 1819 | GNUNET_SERVICE_client_continue (nc->client); |
@@ -1823,14 +1828,14 @@ handle_iteration_start (void *cls, | |||
1823 | */ | 1828 | */ |
1824 | static void | 1829 | static void |
1825 | handle_iteration_stop (void *cls, | 1830 | handle_iteration_stop (void *cls, |
1826 | const struct ZoneIterationStopMessage *zis_msg) | 1831 | const struct ZoneIterationStopMessage *zis_msg) |
1827 | { | 1832 | { |
1828 | struct NamestoreClient *nc = cls; | 1833 | struct NamestoreClient *nc = cls; |
1829 | struct ZoneIteration *zi; | 1834 | struct ZoneIteration *zi; |
1830 | uint32_t rid; | 1835 | uint32_t rid; |
1831 | 1836 | ||
1832 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1837 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1833 | "Received ZONE_ITERATION_STOP message\n"); | 1838 | "Received ZONE_ITERATION_STOP message\n"); |
1834 | rid = ntohl (zis_msg->gns_header.r_id); | 1839 | rid = ntohl (zis_msg->gns_header.r_id); |
1835 | for (zi = nc->op_head; NULL != zi; zi = zi->next) | 1840 | for (zi = nc->op_head; NULL != zi; zi = zi->next) |
1836 | if (zi->request_id == rid) | 1841 | if (zi->request_id == rid) |
@@ -1842,8 +1847,8 @@ handle_iteration_stop (void *cls, | |||
1842 | return; | 1847 | return; |
1843 | } | 1848 | } |
1844 | GNUNET_CONTAINER_DLL_remove (nc->op_head, | 1849 | GNUNET_CONTAINER_DLL_remove (nc->op_head, |
1845 | nc->op_tail, | 1850 | nc->op_tail, |
1846 | zi); | 1851 | zi); |
1847 | GNUNET_free (zi); | 1852 | GNUNET_free (zi); |
1848 | GNUNET_SERVICE_client_continue (nc->client); | 1853 | GNUNET_SERVICE_client_continue (nc->client); |
1849 | } | 1854 | } |
@@ -1857,7 +1862,7 @@ handle_iteration_stop (void *cls, | |||
1857 | */ | 1862 | */ |
1858 | static void | 1863 | static void |
1859 | handle_iteration_next (void *cls, | 1864 | handle_iteration_next (void *cls, |
1860 | const struct ZoneIterationNextMessage *zis_msg) | 1865 | const struct ZoneIterationNextMessage *zis_msg) |
1861 | { | 1866 | { |
1862 | struct NamestoreClient *nc = cls; | 1867 | struct NamestoreClient *nc = cls; |
1863 | struct ZoneIteration *zi; | 1868 | struct ZoneIteration *zi; |
@@ -1939,9 +1944,9 @@ monitor_sync (struct ZoneMonitor *zm) | |||
1939 | struct GNUNET_MessageHeader *sync; | 1944 | struct GNUNET_MessageHeader *sync; |
1940 | 1945 | ||
1941 | env = GNUNET_MQ_msg (sync, | 1946 | env = GNUNET_MQ_msg (sync, |
1942 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC); | 1947 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC); |
1943 | GNUNET_MQ_send (zm->nc->mq, | 1948 | GNUNET_MQ_send (zm->nc->mq, |
1944 | env); | 1949 | env); |
1945 | /* mark iteration done */ | 1950 | /* mark iteration done */ |
1946 | zm->in_first_iteration = GNUNET_NO; | 1951 | zm->in_first_iteration = GNUNET_NO; |
1947 | zm->iteration_cnt = 0; | 1952 | zm->iteration_cnt = 0; |
@@ -1972,11 +1977,11 @@ monitor_iteration_next (void *cls); | |||
1972 | */ | 1977 | */ |
1973 | static void | 1978 | static void |
1974 | monitor_iterate_cb (void *cls, | 1979 | monitor_iterate_cb (void *cls, |
1975 | uint64_t seq, | 1980 | uint64_t seq, |
1976 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 1981 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
1977 | const char *name, | 1982 | const char *name, |
1978 | unsigned int rd_count, | 1983 | unsigned int rd_count, |
1979 | const struct GNUNET_GNSRECORD_Data *rd) | 1984 | const struct GNUNET_GNSRECORD_Data *rd) |
1980 | { | 1985 | { |
1981 | struct ZoneMonitor *zm = cls; | 1986 | struct ZoneMonitor *zm = cls; |
1982 | 1987 | ||
@@ -1989,11 +1994,11 @@ monitor_iterate_cb (void *cls, | |||
1989 | zm->limit--; | 1994 | zm->limit--; |
1990 | zm->iteration_cnt--; | 1995 | zm->iteration_cnt--; |
1991 | send_lookup_response (zm->nc, | 1996 | send_lookup_response (zm->nc, |
1992 | 0, | 1997 | 0, |
1993 | zone_key, | 1998 | zone_key, |
1994 | name, | 1999 | name, |
1995 | rd_count, | 2000 | rd_count, |
1996 | rd); | 2001 | rd); |
1997 | if ( (0 == zm->iteration_cnt) && | 2002 | if ( (0 == zm->iteration_cnt) && |
1998 | (0 != zm->limit) ) | 2003 | (0 != zm->limit) ) |
1999 | { | 2004 | { |
@@ -2014,28 +2019,28 @@ monitor_iterate_cb (void *cls, | |||
2014 | */ | 2019 | */ |
2015 | static void | 2020 | static void |
2016 | handle_monitor_start (void *cls, | 2021 | handle_monitor_start (void *cls, |
2017 | const struct ZoneMonitorStartMessage *zis_msg) | 2022 | const struct ZoneMonitorStartMessage *zis_msg) |
2018 | { | 2023 | { |
2019 | struct NamestoreClient *nc = cls; | 2024 | struct NamestoreClient *nc = cls; |
2020 | struct ZoneMonitor *zm; | 2025 | struct ZoneMonitor *zm; |
2021 | 2026 | ||
2022 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2027 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2023 | "Received ZONE_MONITOR_START message\n"); | 2028 | "Received ZONE_MONITOR_START message\n"); |
2024 | zm = GNUNET_new (struct ZoneMonitor); | 2029 | zm = GNUNET_new (struct ZoneMonitor); |
2025 | zm->nc = nc; | 2030 | zm->nc = nc; |
2026 | zm->zone = zis_msg->zone; | 2031 | zm->zone = zis_msg->zone; |
2027 | zm->limit = 1; | 2032 | zm->limit = 1; |
2028 | zm->in_first_iteration = (GNUNET_YES == ntohl (zis_msg->iterate_first)); | 2033 | zm->in_first_iteration = (GNUNET_YES == ntohl (zis_msg->iterate_first)); |
2029 | GNUNET_CONTAINER_DLL_insert (monitor_head, | 2034 | GNUNET_CONTAINER_DLL_insert (monitor_head, |
2030 | monitor_tail, | 2035 | monitor_tail, |
2031 | zm); | 2036 | zm); |
2032 | GNUNET_SERVICE_client_mark_monitor (nc->client); | 2037 | GNUNET_SERVICE_client_mark_monitor (nc->client); |
2033 | GNUNET_SERVICE_client_continue (nc->client); | 2038 | GNUNET_SERVICE_client_continue (nc->client); |
2034 | GNUNET_notification_context_add (monitor_nc, | 2039 | GNUNET_notification_context_add (monitor_nc, |
2035 | nc->mq); | 2040 | nc->mq); |
2036 | if (zm->in_first_iteration) | 2041 | if (zm->in_first_iteration) |
2037 | zm->task = GNUNET_SCHEDULER_add_now (&monitor_iteration_next, | 2042 | zm->task = GNUNET_SCHEDULER_add_now (&monitor_iteration_next, |
2038 | zm); | 2043 | zm); |
2039 | else | 2044 | else |
2040 | monitor_sync (zm); | 2045 | monitor_sync (zm); |
2041 | } | 2046 | } |
@@ -2060,14 +2065,14 @@ monitor_iteration_next (void *cls) | |||
2060 | zm->iteration_cnt = zm->limit; /* use it all */ | 2065 | zm->iteration_cnt = zm->limit; /* use it all */ |
2061 | ret = GSN_database->iterate_records (GSN_database->cls, | 2066 | ret = GSN_database->iterate_records (GSN_database->cls, |
2062 | (0 == memcmp (&zm->zone, | 2067 | (0 == memcmp (&zm->zone, |
2063 | &zero, | 2068 | &zero, |
2064 | sizeof (zero))) | 2069 | sizeof (zero))) |
2065 | ? NULL | 2070 | ? NULL |
2066 | : &zm->zone, | 2071 | : &zm->zone, |
2067 | zm->seq, | 2072 | zm->seq, |
2068 | zm->iteration_cnt, | 2073 | zm->iteration_cnt, |
2069 | &monitor_iterate_cb, | 2074 | &monitor_iterate_cb, |
2070 | zm); | 2075 | zm); |
2071 | if (GNUNET_SYSERR == ret) | 2076 | if (GNUNET_SYSERR == ret) |
2072 | { | 2077 | { |
2073 | GNUNET_SERVICE_client_drop (zm->nc->client); | 2078 | GNUNET_SERVICE_client_drop (zm->nc->client); |
@@ -2098,7 +2103,7 @@ handle_monitor_next (void *cls, | |||
2098 | 2103 | ||
2099 | inc = GNUNET_ntohll (nm->limit); | 2104 | inc = GNUNET_ntohll (nm->limit); |
2100 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2105 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2101 | "Received ZONE_MONITOR_NEXT message with limit %llu\n", | 2106 | "Received ZONE_MONITOR_NEXT message with limit %llu\n", |
2102 | (unsigned long long) inc); | 2107 | (unsigned long long) inc); |
2103 | for (zm = monitor_head; NULL != zm; zm = zm->next) | 2108 | for (zm = monitor_head; NULL != zm; zm = zm->next) |
2104 | if (zm->nc == nc) | 2109 | if (zm->nc == nc) |
@@ -2161,13 +2166,13 @@ run (void *cls, | |||
2161 | (void) cls; | 2166 | (void) cls; |
2162 | (void) service; | 2167 | (void) service; |
2163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2168 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2164 | "Starting namestore service\n"); | 2169 | "Starting namestore service\n"); |
2165 | cache_keys = GNUNET_CONFIGURATION_get_value_yesno (cfg, | 2170 | cache_keys = GNUNET_CONFIGURATION_get_value_yesno (cfg, |
2166 | "namestore", | 2171 | "namestore", |
2167 | "CACHE_KEYS"); | 2172 | "CACHE_KEYS"); |
2168 | disable_namecache = GNUNET_CONFIGURATION_get_value_yesno (cfg, | 2173 | disable_namecache = GNUNET_CONFIGURATION_get_value_yesno (cfg, |
2169 | "namecache", | 2174 | "namecache", |
2170 | "DISABLE"); | 2175 | "DISABLE"); |
2171 | GSN_cfg = cfg; | 2176 | GSN_cfg = cfg; |
2172 | monitor_nc = GNUNET_notification_context_create (1); | 2177 | monitor_nc = GNUNET_notification_context_create (1); |
2173 | if (GNUNET_YES != disable_namecache) | 2178 | if (GNUNET_YES != disable_namecache) |
@@ -2193,12 +2198,12 @@ run (void *cls, | |||
2193 | statistics = GNUNET_STATISTICS_create ("namestore", | 2198 | statistics = GNUNET_STATISTICS_create ("namestore", |
2194 | cfg); | 2199 | cfg); |
2195 | GNUNET_SCHEDULER_add_shutdown (&cleanup_task, | 2200 | GNUNET_SCHEDULER_add_shutdown (&cleanup_task, |
2196 | NULL); | 2201 | NULL); |
2197 | if (NULL == GSN_database) | 2202 | if (NULL == GSN_database) |
2198 | { | 2203 | { |
2199 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2204 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
2200 | "Could not load database backend `%s'\n", | 2205 | "Could not load database backend `%s'\n", |
2201 | db_lib_name); | 2206 | db_lib_name); |
2202 | GNUNET_SCHEDULER_shutdown (); | 2207 | GNUNET_SCHEDULER_shutdown (); |
2203 | return; | 2208 | return; |
2204 | } | 2209 | } |
@@ -2216,37 +2221,37 @@ GNUNET_SERVICE_MAIN | |||
2216 | &client_disconnect_cb, | 2221 | &client_disconnect_cb, |
2217 | NULL, | 2222 | NULL, |
2218 | GNUNET_MQ_hd_var_size (record_store, | 2223 | GNUNET_MQ_hd_var_size (record_store, |
2219 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE, | 2224 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE, |
2220 | struct RecordStoreMessage, | 2225 | struct RecordStoreMessage, |
2221 | NULL), | 2226 | NULL), |
2222 | GNUNET_MQ_hd_var_size (record_lookup, | 2227 | GNUNET_MQ_hd_var_size (record_lookup, |
2223 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP, | 2228 | GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP, |
2224 | struct LabelLookupMessage, | 2229 | struct LabelLookupMessage, |
2225 | NULL), | 2230 | NULL), |
2226 | GNUNET_MQ_hd_fixed_size (zone_to_name, | 2231 | GNUNET_MQ_hd_fixed_size (zone_to_name, |
2227 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME, | 2232 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME, |
2228 | struct ZoneToNameMessage, | 2233 | struct ZoneToNameMessage, |
2229 | NULL), | 2234 | NULL), |
2230 | GNUNET_MQ_hd_fixed_size (iteration_start, | 2235 | GNUNET_MQ_hd_fixed_size (iteration_start, |
2231 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START, | 2236 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START, |
2232 | struct ZoneIterationStartMessage, | 2237 | struct ZoneIterationStartMessage, |
2233 | NULL), | 2238 | NULL), |
2234 | GNUNET_MQ_hd_fixed_size (iteration_next, | 2239 | GNUNET_MQ_hd_fixed_size (iteration_next, |
2235 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT, | 2240 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT, |
2236 | struct ZoneIterationNextMessage, | 2241 | struct ZoneIterationNextMessage, |
2237 | NULL), | 2242 | NULL), |
2238 | GNUNET_MQ_hd_fixed_size (iteration_stop, | 2243 | GNUNET_MQ_hd_fixed_size (iteration_stop, |
2239 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP, | 2244 | GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP, |
2240 | struct ZoneIterationStopMessage, | 2245 | struct ZoneIterationStopMessage, |
2241 | NULL), | 2246 | NULL), |
2242 | GNUNET_MQ_hd_fixed_size (monitor_start, | 2247 | GNUNET_MQ_hd_fixed_size (monitor_start, |
2243 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START, | 2248 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START, |
2244 | struct ZoneMonitorStartMessage, | 2249 | struct ZoneMonitorStartMessage, |
2245 | NULL), | 2250 | NULL), |
2246 | GNUNET_MQ_hd_fixed_size (monitor_next, | 2251 | GNUNET_MQ_hd_fixed_size (monitor_next, |
2247 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT, | 2252 | GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT, |
2248 | struct ZoneMonitorNextMessage, | 2253 | struct ZoneMonitorNextMessage, |
2249 | NULL), | 2254 | NULL), |
2250 | GNUNET_MQ_handler_end ()); | 2255 | GNUNET_MQ_handler_end ()); |
2251 | 2256 | ||
2252 | 2257 | ||
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index 6960e5d12..07784a779 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c | |||
@@ -503,7 +503,6 @@ get_records_and_call_iterator (struct Plugin *plugin, | |||
503 | 503 | ||
504 | if (NULL == zone_key) | 504 | if (NULL == zone_key) |
505 | { | 505 | { |
506 | zone_key = &zk; | ||
507 | ret = GNUNET_SQ_extract_result (stmt, | 506 | ret = GNUNET_SQ_extract_result (stmt, |
508 | rsx); | 507 | rsx); |
509 | } | 508 | } |
@@ -537,10 +536,12 @@ get_records_and_call_iterator (struct Plugin *plugin, | |||
537 | } | 536 | } |
538 | else | 537 | else |
539 | { | 538 | { |
539 | if (NULL != zone_key) | ||
540 | zk = *zone_key; | ||
540 | if (NULL != iter) | 541 | if (NULL != iter) |
541 | iter (iter_cls, | 542 | iter (iter_cls, |
542 | seq + 1, | 543 | seq + 1, |
543 | zone_key, | 544 | &zk, |
544 | label, | 545 | label, |
545 | record_count, | 546 | record_count, |
546 | rd); | 547 | rd); |