diff options
author | Fritz Elfert <felfert@to.com> | 2001-01-14 22:28:37 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2001-01-14 22:28:37 +0000 |
commit | f6d25b8861f97439d7086e4569e209c46486d009 (patch) | |
tree | 21284d0a969fe8ff811d2bf68ae282070dd230cd /ncpd/link.cc | |
parent | 291e454087804b1f706697ef4849e519606b1cab (diff) | |
download | plptools-f6d25b8861f97439d7086e4569e209c46486d009.tar.gz plptools-f6d25b8861f97439d7086e4569e209c46486d009.tar.bz2 plptools-f6d25b8861f97439d7086e4569e209c46486d009.zip |
- Added Hint for man pages in README.
- Added signal handles for SIGINT and SIGTERM in ncpd for
- properly shutting down the link.
- Added flush() method in link.cc, needed for above feature.
- If started with option -e and no -s option is given, assume being
started by mgetty and use the line ncpd is started on instead of
builtin default.
- Added auto-reset in packet.cc. This helps making IrDA (ircomm-tty)
based connections. Still not satisfying as i sometimes have to
toggle infrared on the Psion (probably a bug in the Psion's IrDA).
Diffstat (limited to 'ncpd/link.cc')
-rw-r--r-- | ncpd/link.cc | 9 |
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() { |