- Move reply list clean for serve expired mesh callback to after

the reply is sent, so that script callbacks have reply_info.
This commit is contained in:
W.C.A. Wijngaards 2020-06-30 13:41:26 +02:00
parent 2a90e8fa1e
commit 8ac054733b
2 changed files with 12 additions and 8 deletions

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

View 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 */