]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Move reply list clean for serve expired mesh callback to after
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 30 Jun 2020 11:41:26 +0000 (13:41 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 30 Jun 2020 11:41:26 +0000 (13:41 +0200)
  the reply is sent, so that script callbacks have reply_info.

doc/Changelog
services/mesh.c

index ff3810b9dd9fa9bde637b7efe5f6c1025ed59c0e..197e4b29bfe2581ba6d8756d87107c5749216310 100644 (file)
@@ -1,3 +1,7 @@
+29 June 2020: Wouter
+       - Move reply list clean for serve expired mesh callback to after
+         the reply is sent, so that script callbacks have reply_info.
+
 24 June 2020: Wouter
        - iana portlist updated.
        - doxygen file comments for dynlibmodule.
index 4bc4341c497f78dd4beebd9eec76e81b515cbd5b..22341441502177adc2cdef9f9636665ee38585bb 100644 (file)
@@ -1959,14 +1959,6 @@ mesh_serve_expired_callback(void* arg)
                log_dns_msg("Serve expired lookup", &qstate->qinfo, msg->rep);
 
        r = mstate->reply_list;
-       mstate->reply_list = NULL;
-       if(!mstate->reply_list && !mstate->cb_list && r) {
-               log_assert(mesh->num_reply_states > 0);
-               mesh->num_reply_states--;
-               if(mstate->super_set.count == 0) {
-                       mesh->num_detached_states++;
-               }
-       }
        for(; r; r = r->next) {
                /* If address info is returned, it means the action should be an
                * 'inform' variant and the information should be logged. */
@@ -2000,6 +1992,14 @@ mesh_serve_expired_callback(void* arg)
                mesh->ans_expired++;
 
        }
+       mstate->reply_list = NULL;
+       if(!mstate->reply_list && !mstate->cb_list && r) {
+               log_assert(mesh->num_reply_states > 0);
+               mesh->num_reply_states--;
+               if(mstate->super_set.count == 0) {
+                       mesh->num_detached_states++;
+               }
+       }
        while((c = mstate->cb_list) != NULL) {
                /* take this cb off the list; so that the list can be
                 * changed, eg. by adds from the callback routine */