summaryrefslogtreecommitdiffhomepage
path: root/listener.c
diff options
context:
space:
mode:
Diffstat (limited to 'listener.c')
-rw-r--r--listener.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/listener.c b/listener.c
index dd90c6b..a7f0730 100644
--- a/listener.c
+++ b/listener.c
@@ -161,5 +161,14 @@ void remove_listener(struct Listener* listener) {
}
ses.listeners[listener->index] = NULL;
m_free(listener);
+}
+void remove_all_listeners(void) {
+ unsigned int i;
+ for (i = 0; i < ses.listensize; i++) {
+ if (ses.listeners[i]) {
+ remove_listener(ses.listeners[i]);
+ }
+ }
+ m_free(ses.listeners);
}