aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd/link.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ncpd/link.cc')
-rw-r--r--ncpd/link.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/ncpd/link.cc b/ncpd/link.cc
index fac136b..f4f73e4 100644
--- a/ncpd/link.cc
+++ b/ncpd/link.cc
@@ -50,6 +50,7 @@ link::link(const char *fname, int baud, IOWatch & iow, unsigned short _verbose)
link::~link()
{
+ flush();
delete p;
}
@@ -61,7 +62,7 @@ reset() {
somethingToSend = false;
timesSent = 0;
failed = false;
-// p->reset();
+ // p->reset();
}
short int link::
@@ -216,6 +217,12 @@ poll()
return ret;
}
+void link::
+flush() {
+ while ((!failed) && stuffToSend())
+ poll();
+}
+
bool link::
stuffToSend()
{