aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorEric <ewild@sysmocom.de>2021-09-09 15:42:32 +0200
committerEric <ewild@sysmocom.de>2021-09-10 14:50:26 +0200
commit11a58a1b34f8bba398f16358a863a0ab273c8307 (patch)
treecbc54065e2c108b777ad1004fa16e8537922ece9 /src/vty
parenta7a757f2eec39c3f4ce01055327c3ec84ee39ef0 (diff)
vty: allow flushing
It was so far sufficient to wait for the buffers to drain at some random point in time, but this is not always the case, sometimes it is important that the output is flushed immediately. Change-Id: If984b9ad2eba9f400bc29a7aa8825e241fd1d2a9
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/vty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index a39f2680..1ad84f53 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -207,6 +207,12 @@ static void vty_auth(struct vty *vty)
}
}
+void vty_flush(struct vty *vty)
+{
+ if (vty->obuf)
+ buffer_flush_all(vty->obuf, vty->fd);
+}
+
/*! Close a given vty interface. */
void vty_close(struct vty *vty)
{