From: Alan T. DeKok Date: Sat, 30 Mar 2024 15:42:27 +0000 (-0400) Subject: we don't need or use a "cancelled" entry X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41b2a39423ee91942ba0cba59dac86c268773eb;p=thirdparty%2Ffreeradius-server.git we don't need or use a "cancelled" entry --- diff --git a/src/lib/bio/retry.c b/src/lib/bio/retry.c index 500d856e7cb..4fa1bd797c5 100644 --- a/src/lib/bio/retry.c +++ b/src/lib/bio/retry.c @@ -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