From afef8917d01e904d564dc0a80439225d4f0546c1 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Tue, 31 Jul 2001 18:32:22 +0000 Subject: Some fixes for cleanup when a connect NAK is received. --- ncpd/socketchan.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ncpd') diff --git a/ncpd/socketchan.cc b/ncpd/socketchan.cc index 5d13090..0bb68e6 100644 --- a/ncpd/socketchan.cc +++ b/ncpd/socketchan.cc @@ -69,7 +69,6 @@ getNcpRegisterName() bool socketChan:: ncpCommand(bufferStore & a) { - cerr << "socketChan:: received NCP command (" << a << ")" << endl; // str is guaranteed to begin with NCP$, and all NCP commands are // greater than or equal to 8 characters in length. const char *str = a.getString(); @@ -112,6 +111,8 @@ ncpCommand(bufferStore & a) // DO ME LATER ok = true; } + if (!ok) + cerr << "socketChan:: received unknown NCP command (" << a << ")" << endl; return ok; } @@ -129,9 +130,10 @@ ncpConnectAck() void socketChan:: ncpConnectTerminate() { - connectTry = 0; - skt->closeSocket(); - terminateWhenAsked(); + bufferStore a; + a.addStringT("NAK"); + skt->sendBufferStore(a); + ncpDisconnect(); } void socketChan:: -- cgit v1.2.3