]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
we don't need or use a "cancelled" entry
authorAlan T. DeKok <aland@freeradius.org>
Sat, 30 Mar 2024 15:42:27 +0000 (11:42 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 30 Mar 2024 22:13:46 +0000 (18:13 -0400)
src/lib/bio/retry.c

index 500d856e7cb0edcf8fa9eaa465492d97641761fc..4fa1bd797c5a3d4b8ce8478979cc811984ab1931 100644 (file)
@@ -57,7 +57,6 @@ struct fr_bio_retry_entry_s {
        size_t          partial;                //!< for partial writes :(
 
        bool            have_reply;             //!< did we see any reply?
-       bool            cancelled;              //!< was it cancelled?
 };
 
 FR_DLIST_FUNCS(fr_bio_retry_list, fr_bio_retry_entry_t, entry)
@@ -422,8 +421,6 @@ static ssize_t fr_bio_retry_write(fr_bio_t *bio, void *packet_ctx, void const *b
 
                if (!item->retry.replies) return fr_bio_error(BUFFER_FULL);
 
-               fr_assert(!item->cancelled);
-
                if (fr_bio_retry_entry_cancel(bio, item) < 0) return fr_bio_error(BUFFER_FULL);
 
                /*
@@ -455,7 +452,6 @@ static ssize_t fr_bio_retry_write(fr_bio_t *bio, void *packet_ctx, void const *b
        item->size = size;
        item->partial = 0;
        item->have_reply = false;
-       item->cancelled = false;
 
        /*
         *      Tell the application that we've saved the packet.  The "item" pointer allows the application
@@ -600,8 +596,6 @@ int fr_bio_retry_entry_cancel(fr_bio_t *bio, fr_bio_retry_entry_t *item)
 
        fr_assert(item->buffer != NULL);
 
-       if (item->cancelled) return 1;
-
        /*
         *      If we've written a partial packet, jump through a bunch of hoops to cache the partial packet
         *      data.  This lets the application cancel any pending packet, while still making sure that we