- Fix num_reply_states and num_detached_states counting with

serve_expired_callback.
This commit is contained in:
George Thessalonikefs 2020-02-06 11:44:48 +01:00
parent af7abd4dfd
commit 0758d29324
2 changed files with 11 additions and 7 deletions

View 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.

View 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++;
}
}
}