From 1492e1879a7c6e43990b5ade615808a9d27b5e74 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sat, 20 Dec 2008 19:09:44 +0000 Subject: Workaround for Series 3a bug (SourceForge bug #2441386, patch from Jim Hague). --- ncpd/ncp.cc | 6 ++++++ ncpd/ncp.h | 1 + 2 files changed, 7 insertions(+) (limited to 'ncpd') diff --git a/ncpd/ncp.cc b/ncpd/ncp.cc index 83fa8b9..7e87083 100644 --- a/ncpd/ncp.cc +++ b/ncpd/ncp.cc @@ -137,6 +137,11 @@ receive(bufferStore s) { } else { int allData = s.getByte(1); s.discardFirstBytes(2); + + if (protocolVersion == PV_SERIES_3) { + channel = lastSentChannel; + } + if (!isValidChannel(channel)) { lerr << "ncp: Got message for unknown channel\n"; } else { @@ -466,6 +471,7 @@ send(int channel, bufferStore & a) a.discardFirstBytes(NCP_SENDLEN); l->send(out); } while (!last); + lastSentChannel = channel; } void ncp:: diff --git a/ncpd/ncp.h b/ncpd/ncp.h index fba51e5..66039ac 100644 --- a/ncpd/ncp.h +++ b/ncpd/ncp.h @@ -113,6 +113,7 @@ private: linkChan *lChan; int maxChannels; std::vector pcServers; + int lastSentChannel; }; #endif -- cgit v1.2.3