]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix num_reply_states and num_detached_states counting with
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Thu, 6 Feb 2020 10:44:48 +0000 (11:44 +0100)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Thu, 6 Feb 2020 10:44:48 +0000 (11:44 +0100)
  serve_expired_callback.

doc/Changelog
services/mesh.c

index 44bfffd7adb9494809314da426ef118bd2de18d6..9fe7f3cc5a963d35ffda73a3b2c0c1955719795d 100644 (file)
@@ -1,3 +1,7 @@
+6 February 2020: George
+       - Fix num_reply_states and num_detached_states counting with
+         serve_expired_callback.
+
 6 February 2020: Wouter
        - Fix num_reply_addr counting in mesh and tcp drop due to size
          after serve_stale commit.
index 3e501e7825d26386347050645a0b7abe22cbf98a..48558843836d212fd3a619187c311b0a0d7d7d3d 100644 (file)
@@ -1971,6 +1971,13 @@ mesh_serve_expired_callback(void* arg)
 
        r = mstate->reply_list;
        mstate->reply_list = NULL;
+       if(!mstate->reply_list && !mstate->cb_list) {
+               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. */
@@ -2018,11 +2025,4 @@ mesh_serve_expired_callback(void* arg)
                        qstate->env->mesh->num_detached_states++;
                mesh_do_callback(mstate, LDNS_RCODE_NOERROR, msg->rep, c);
        }
-       if(!mstate->reply_list && !mstate->cb_list) {
-               log_assert(mesh->num_reply_states > 0);
-               mesh->num_reply_states--;
-               if(mstate->super_set.count == 0) {
-                       mesh->num_detached_states++;
-               }
-       }
 }