]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add null_reply function
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Aug 2017 17:22:11 +0000 (13:22 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Aug 2017 20:25:24 +0000 (16:25 -0400)
src/lib/io/channel.c
src/lib/io/channel.h

index 124c12efee24f58051934029eb18a0caace99e70..3d102250fd770f445a2423c0a2cf53f66e84362b 100644 (file)
@@ -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.
index eb93bab6cabadf917619e694ee937be678504179..398168414e53840ba3a4a8c234b4045c67958612 100644 (file)
@@ -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);