summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/telnet_interface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index dc23b12a..a1fc9990 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -197,6 +197,16 @@ static int telnet_new_connection(struct osmo_fd *fd, unsigned int what)
return 0;
}
+bool vty_is_active(struct vty *vty)
+{
+ struct telnet_connection *connection;
+ llist_for_each_entry(connection, &active_connections, entry) {
+ if (connection->vty == vty)
+ return true;
+ }
+ return false;
+}
+
/*! callback from core VTY code about VTY related events */
void vty_event(enum event event, int sock, struct vty *vty)
{