<p>Hoernchen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25413">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty: allow flushing<br><br>Change-Id: If984b9ad2eba9f400bc29a7aa8825e241fd1d2a9<br>---<br>M include/osmocom/vty/vty.h<br>M src/vty/vty.c<br>2 files changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/25413/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h</span><br><span>index 3e6178f..c13f435 100644</span><br><span>--- a/include/osmocom/vty/vty.h</span><br><span>+++ b/include/osmocom/vty/vty.h</span><br><span>@@ -222,6 +222,7 @@</span><br><span> int vty_read(struct vty *vty);</span><br><span> //void vty_time_print (struct vty *, int);</span><br><span> void vty_close (struct vty *);</span><br><span style="color: hsl(120, 100%, 40%);">+void vty_flush(struct vty *vty);</span><br><span> char *vty_get_cwd (void);</span><br><span> void vty_log (const char *level, const char *proto, const char *fmt, va_list);</span><br><span> int vty_config_lock (struct vty *);</span><br><span>diff --git a/src/vty/vty.c b/src/vty/vty.c</span><br><span>index a39f268..1ad84f5 100644</span><br><span>--- a/src/vty/vty.c</span><br><span>+++ b/src/vty/vty.c</span><br><span>@@ -207,6 +207,12 @@</span><br><span>         }</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+void vty_flush(struct vty *vty)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+        if (vty->obuf)</span><br><span style="color: hsl(120, 100%, 40%);">+             buffer_flush_all(vty->obuf, vty->fd);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*! Close a given vty interface. */</span><br><span> void vty_close(struct vty *vty)</span><br><span> {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25413">change 25413</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/25413"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If984b9ad2eba9f400bc29a7aa8825e241fd1d2a9 </div>
<div style="display:none"> Gerrit-Change-Number: 25413 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>