aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-07-31 18:32:22 +0000
committerFritz Elfert <felfert@to.com>2001-07-31 18:32:22 +0000
commitafef8917d01e904d564dc0a80439225d4f0546c1 (patch)
tree6b3f4cd9f230b7ffa092291cb927750934d23d62 /ncpd
parent6aa6ba4bb210102485e8d534eac2aa853b7f54b5 (diff)
downloadplptools-afef8917d01e904d564dc0a80439225d4f0546c1.tar.gz
plptools-afef8917d01e904d564dc0a80439225d4f0546c1.tar.bz2
plptools-afef8917d01e904d564dc0a80439225d4f0546c1.zip
Some fixes for cleanup when a connect NAK is received.
Diffstat (limited to 'ncpd')
-rw-r--r--ncpd/socketchan.cc10
1 files changed, 6 insertions, 4 deletions
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::