From: Arran Cudbard-Bell Date: Fri, 6 Dec 2019 11:45:31 +0000 (+0700) Subject: Call the cancel callback after the request has changed state X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfdd0f6c3ff37bf1ca01c4763c4b387efdda4c54;p=thirdparty%2Ffreeradius-server.git Call the cancel callback after the request has changed state --- diff --git a/src/lib/server/trunk.c b/src/lib/server/trunk.c index 8a100c723d0..4d9c588e53d 100644 --- a/src/lib/server/trunk.c +++ b/src/lib/server/trunk.c @@ -887,12 +887,10 @@ static void trunk_request_enter_cancel(fr_trunk_request_t *treq, fr_trunk_cancel switch (treq->state) { case FR_TRUNK_REQUEST_PARTIAL: REQUEST_EXTRACT_PARTIAL(treq); - DO_REQUEST_CANCEL(treq, reason); break; case FR_TRUNK_REQUEST_SENT: fr_dlist_remove(&tconn->sent, treq); - DO_REQUEST_CANCEL(treq, reason); break; default: @@ -903,6 +901,8 @@ static void trunk_request_enter_cancel(fr_trunk_request_t *treq, fr_trunk_cancel fr_dlist_insert_tail(&tconn->cancel, treq); treq->cancel_reason = reason; + DO_REQUEST_CANCEL(treq, reason); + /* * Our treq is no longer bound to an actual * REQUEST *, as we can't guarantee the