aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd
diff options
context:
space:
mode:
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