From: Alan T. DeKok Date: Thu, 24 Aug 2017 17:22:11 +0000 (-0400) Subject: add null_reply function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ccb9b3a75f2134b0d4d6bf18585aedfd05499f2;p=thirdparty%2Ffreeradius-server.git add null_reply function --- diff --git a/src/lib/io/channel.c b/src/lib/io/channel.c index 124c12efee2..3d102250fd7 100644 --- a/src/lib/io/channel.c +++ b/src/lib/io/channel.c @@ -538,6 +538,27 @@ int fr_channel_send_reply(fr_channel_t *ch, fr_channel_data_t *cd, fr_channel_da } +/** Don't send a reply message into the channel + * + * The message should be the one we received from the network. + * + * @param[in] ch the channel on which we're dropping a packet + * @return + * - <0 on error + * - 0 on success + */ +int fr_channel_null_reply(fr_channel_t *ch) +{ + fr_channel_end_t *worker; + + worker = &(ch->end[FROM_WORKER]); + + worker->sequence++; + return 0; +} + + + /** Signal a channel that the worker is sleeping * * This function should be called from the workers idle loop. diff --git a/src/lib/io/channel.h b/src/lib/io/channel.h index eb93bab6cab..398168414e5 100644 --- a/src/lib/io/channel.h +++ b/src/lib/io/channel.h @@ -125,6 +125,8 @@ int fr_channel_send_request(fr_channel_t *ch, fr_channel_data_t *cm, fr_channel_ fr_channel_data_t *fr_channel_recv_request(fr_channel_t *ch) CC_HINT(nonnull); int fr_channel_send_reply(fr_channel_t *ch, fr_channel_data_t *cm, fr_channel_data_t **p_request) CC_HINT(nonnull); +int fr_channel_null_reply(fr_channel_t *ch) CC_HINT(nonnull); + fr_channel_data_t *fr_channel_recv_reply(fr_channel_t *ch) CC_HINT(nonnull); int fr_channel_worker_sleeping(fr_channel_t *ch) CC_HINT(nonnull);