diff options
-rw-r--r-- | include/osmocom/vty/vty.h | 1 | ||||
-rw-r--r-- | src/vty/vty.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index 3e6178f1..c13f4356 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -222,6 +222,7 @@ int vty_out_newline(struct vty *); int vty_read(struct vty *vty); //void vty_time_print (struct vty *, int); void vty_close (struct vty *); +void vty_flush(struct vty *vty); char *vty_get_cwd (void); void vty_log (const char *level, const char *proto, const char *fmt, va_list); int vty_config_lock (struct vty *); 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) { |