aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2008-12-20 19:09:44 +0000
committerReuben Thomas <rrt@sc3d.org>2008-12-20 19:09:44 +0000
commit1492e1879a7c6e43990b5ade615808a9d27b5e74 (patch)
tree12bf072c68a9e7842413150777d45408ad164820 /ncpd
parentc470d7c22963163593f34cf62d18a76f80b05f37 (diff)
downloadplptools-1492e1879a7c6e43990b5ade615808a9d27b5e74.tar.gz
plptools-1492e1879a7c6e43990b5ade615808a9d27b5e74.tar.bz2
plptools-1492e1879a7c6e43990b5ade615808a9d27b5e74.zip
Workaround for Series 3a bug (SourceForge bug #2441386, patch from Jim
Hague).
Diffstat (limited to 'ncpd')
-rw-r--r--ncpd/ncp.cc6
-rw-r--r--ncpd/ncp.h1
2 files changed, 7 insertions, 0 deletions
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<PcServer> pcServers;
+ int lastSentChannel;
};
#endif