From 0df34ec5ddb92ce7e3bcbb4f0eb24e30955ba3a1 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sun, 11 Aug 2002 01:41:45 +0000 Subject: - Fixed setting of CFLAGS and CXXFLAGS: With --enable-debug, disable -O - Removed ccmalloc support. Now using valgrind - Added missing mainainer-clean-local targets - Fixed uninitialized array in IOwatch, reported by valgrind. - Fixed missing definition of LC_ALL if compiling without -O - Fixed invalid access to datapump thread (not yet created), reported by valgrind. - Fixed wrong parameters of QRegExp when using QT 3.x - Fixed KTar initialization which has changed in KDE 3.x --- ncpd/Makefile.am | 2 +- ncpd/packet.cc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'ncpd') 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(); } } } -- cgit v1.2.3