aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-16 13:24:44 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-16 13:24:44 +0200
commitb983587ce81228c1337ebd0ebd492a29c0104cd2 (patch)
tree7d8e741ce08e13068d057b540802b9f6fcff64be /src/namestore
parent6e69bdb7ce01dcbc9d6be5f2da4555b270a1cefe (diff)
downloadgnunet-b983587ce81228c1337ebd0ebd492a29c0104cd2.tar.gz
gnunet-b983587ce81228c1337ebd0ebd492a29c0104cd2.zip
fix mgmgt of heap nodes
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-zoneimport.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c
index 10d9cb4b6..763687c59 100644
--- a/src/namestore/gnunet-zoneimport.c
+++ b/src/namestore/gnunet-zoneimport.c
@@ -752,8 +752,12 @@ process_result (void *cls,
752 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 752 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
753 "Stub gave up on DNS reply for `%s'\n", 753 "Stub gave up on DNS reply for `%s'\n",
754 req->hostname); 754 req->hostname);
755 GNUNET_assert (req == GNUNET_CONTAINER_heap_remove_node (req->hn)); 755 if (NULL != req->hn)
756 req->hn = NULL; 756 {
757 GNUNET_break (0); /* should not be possible */
758 GNUNET_assert (req == GNUNET_CONTAINER_heap_remove_node (req->hn));
759 req->hn = NULL;
760 }
757 if (req->issue_num > MAX_RETRIES) 761 if (req->issue_num > MAX_RETRIES)
758 { 762 {
759 failures++; 763 failures++;
@@ -771,8 +775,12 @@ process_result (void *cls,
771 pending--; 775 pending--;
772 GNUNET_DNSSTUB_resolve_cancel (req->rs); 776 GNUNET_DNSSTUB_resolve_cancel (req->rs);
773 req->rs = NULL; 777 req->rs = NULL;
774 GNUNET_assert (req == GNUNET_CONTAINER_heap_remove_node (req->hn)); 778 if (NULL != req->hn)
775 req->hn = NULL; 779 {
780 GNUNET_break (0); /* should not be possible */
781 GNUNET_assert (req == GNUNET_CONTAINER_heap_remove_node (req->hn));
782 req->hn = NULL;
783 }
776 p = GNUNET_DNSPARSER_parse ((const char *) dns, 784 p = GNUNET_DNSPARSER_parse ((const char *) dns,
777 dns_len); 785 dns_len);
778 if (NULL == p) 786 if (NULL == p)
@@ -932,7 +940,7 @@ finish_transaction ()
932 * @param cls NULL 940 * @param cls NULL
933 */ 941 */
934static void 942static void
935process_queue(void *cls) 943process_queue (void *cls)
936{ 944{
937 struct Request *req; 945 struct Request *req;
938 static unsigned int cnt; 946 static unsigned int cnt;