]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add flag / assertion for request is finished
authorAlan T. DeKok <aland@freeradius.org>
Wed, 27 Jan 2021 15:51:06 +0000 (10:51 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 Jan 2021 15:51:59 +0000 (10:51 -0500)
so that we don't erroneously refuse to clean it up

src/lib/io/master.c
src/lib/io/master.h

index 620c5702b10a8f71a012f47f8cfa4be27b330326..d3769bfa0b716f2c3f8103a1797a867c75d09eda 100644 (file)
@@ -1547,6 +1547,7 @@ have_client:
                                }
 
                                if (!track->reply) {
+                                       fr_assert(!track->finished);
                                        DEBUG("Ignoring retransmit from client %s - we are still processing the request", client->radclient->shortname);
                                        return 0;
                                }
@@ -2160,6 +2161,8 @@ static ssize_t mod_write(fr_listen_t *li, void *packet_ctx, fr_time_t request_ti
        if (client->state != PR_CLIENT_PENDING) {
                ssize_t packet_len;
 
+               track->finished = true;
+
                /*
                 *      The request later received a conflicting
                 *      packet, so we discard this one.
index 57d8728cbba790e7c704927faa3f030ebb0509ed..3413b996c46e67e97456f8a16676097a994d3884 100644 (file)
@@ -48,6 +48,7 @@ typedef struct {
 
        bool                            discard;        //!< whether or not we discard the packet
        bool                            do_not_respond; //!< don't respond
+       bool                            finished;       //!< are we finished the request?
 
        /*
         *      We can't set the "process" function here, because a