mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
a7a757f2ee
commit
11a58a1b34
|
@ -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 *);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue