aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd
diff options
context:
space:
mode:
Diffstat (limited to 'ncpd')
-rw-r--r--ncpd/Makefile.am2
-rw-r--r--ncpd/packet.cc10
2 files changed, 6 insertions, 6 deletions
diff --git a/ncpd/Makefile.am b/ncpd/Makefile.am
index b06edb3..0338e97 100644
--- a/ncpd/Makefile.am
+++ b/ncpd/Makefile.am
@@ -6,7 +6,7 @@ CXXFLAGS = $(THREADED_CXXFLAGS)
sbin_PROGRAMS = ncpd
-ncpd_LDADD = $(top_srcdir)/lib/libplp.la -lpthread $(LIBCCMALLOC_CXX)
+ncpd_LDADD = $(top_srcdir)/lib/libplp.la -lpthread
ncpd_SOURCES = channel.cc link.cc linkchan.cc main.cc \
ncp.cc packet.cc socketchan.cc mp_serial.c
EXTRA_DIST = channel.h link.h linkchan.h main.h mp_serial.h ncp.h packet.h \
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();
}
}
}