aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd/packet.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ncpd/packet.cc')
-rw-r--r--ncpd/packet.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/ncpd/packet.cc b/ncpd/packet.cc
index 31eafd0..d352fc9 100644
--- a/ncpd/packet.cc
+++ b/ncpd/packet.cc
@@ -222,8 +222,10 @@ reset()
}
outRead = outWrite = 0;
internalReset();
- if (fd != -1)
+ if (fd != -1) {
pthread_create(&datapump, NULL, pump_run, this);
+ realWrite();
+ }
}
void packet::
@@ -254,10 +256,8 @@ internalReset()
if (verbose & PKT_DEBUG_LOG)
lout << "serial connection set to " << dec << realBaud
<< " baud, fd=" << fd << endl;
- if (fd != -1) {
+ if (fd != -1)
lastFatal = false;
- realWrite();
- }
}
short int packet::
@@ -465,7 +465,7 @@ findSync()
int rx_amount = (inw > inRead) ?
inw - inRead : BUFLEN - inRead + inw;
if (rx_amount > 15)
- internalReset();
+ reset();
}
}
}