]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add stub active / signal_close functions
authorAlan T. DeKok <aland@freeradius.org>
Mon, 21 Nov 2016 20:37:39 +0000 (15:37 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Nov 2016 21:49:23 +0000 (16:49 -0500)
src/util/channel.c
src/util/channel.h

index ea61a38e8f9934496454a54c2e6b424a494a7efd..5a136c5cc82794f31505d27dfd7ccde9e7f306d7 100644 (file)
@@ -530,3 +530,32 @@ fr_channel_event_t fr_channel_service_kevent(int kq, struct kevent const *kev, f
 
        return FR_CHANNEL_NOOP;
 }
+
+
+/** Check if a channel is active.
+ *
+ *  A channel may be closed by either end.  If so, it stays alive (but
+ *  inactive) until both ends acknowledge the close.
+ *
+ * @param[in] ch the channel
+ * @return
+ *     - false the channel is closing.
+ *     - true the channel is active
+ */
+bool fr_channel_active(UNUSED fr_channel_t *ch)
+{
+       return true;
+
+}
+
+/** Signal a channel that it is closing.
+ *
+ * @param[in] ch the channel
+ * @return
+ *     - <0 on error
+ *     - 0 on success
+ */
+int fr_channel_signal_close(UNUSED fr_channel_t *ch)
+{
+       return 0;
+}
index 97b827821311d696b7b154fe62678b45213fb772..665a0ae96639f502441375431d666b1ae8c661d6 100644 (file)
@@ -111,6 +111,9 @@ 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);
 fr_channel_event_t fr_channel_service_kevent(int kq, struct kevent const *kev, fr_time_t when, fr_channel_t **p_channel) CC_HINT(nonnull);
 
+bool fr_channel_active(fr_channel_t *ch) CC_HINT(nonnull);
+int fr_channel_signal_close(fr_channel_t *ch) CC_HINT(nonnull);
+
 #ifdef __cplusplus
 }
 #endif