aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd
diff options
context:
space:
mode:
Diffstat (limited to 'ncpd')
-rw-r--r--ncpd/Makefile.am2
-rw-r--r--ncpd/socketchan.cc18
2 files changed, 11 insertions, 9 deletions
diff --git a/ncpd/Makefile.am b/ncpd/Makefile.am
index 6fc303c..8885fee 100644
--- a/ncpd/Makefile.am
+++ b/ncpd/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES=-I$(top_srcdir)/lib
sbin_PROGRAMS = ncpd
-ncpd_LDADD = $(top_srcdir)/lib/libplp.la
+ncpd_LDADD = $(top_srcdir)/lib/libplp.la $(LIBCCMALLOC)
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 mp_serial.h ncp.h packet.h socketchan.h
diff --git a/ncpd/socketchan.cc b/ncpd/socketchan.cc
index 06b3da2..fa1a40f 100644
--- a/ncpd/socketchan.cc
+++ b/ncpd/socketchan.cc
@@ -130,10 +130,11 @@ ncpConnectAck()
void socketChan::
ncpConnectTerminate()
{
- bufferStore a;
+// bufferStore a;
connectTry = 0;
- a.addStringT("Close");
- skt->sendBufferStore(a);
+// a.addStringT("Close");
+// skt->sendBufferStore(a);
+ skt->closeSocket();
terminateWhenAsked();
}
@@ -202,13 +203,14 @@ socketPoll()
int res = skt->getBufferStore(a, false);
if (res == -1) {
ncpDisconnect();
+ skt->closeSocket();
} else if (res == 1) {
- if (a.getLen() > 5 &&
- !strncmp(a.getString(), "Close", 5)) {
- ncpDisconnect();
- } else {
+// if (a.getLen() > 4 &&
+// !strncmp(a.getString(), "Close", 5)) {
+// ncpDisconnect();
+// } else {
ncpSend(a);
- }
+// }
}
}
}