[ntcore] Use full handle when subscribing (#5013)

Just using the index is insufficient because of Subscriber overlap with
MultiSubscriber.
This commit is contained in:
Peter Johnson
2023-01-27 09:14:38 -08:00
committed by GitHub
parent 7cd30cffbc
commit 1a47cc2e86
2 changed files with 5 additions and 5 deletions

View File

@@ -142,10 +142,9 @@ bool nt::net::WireEncodeText(wpi::raw_ostream& os, const ClientMessage& msg) {
} else if (auto m = std::get_if<SetPropertiesMsg>(&msg.contents)) {
WireEncodeSetProperties(os, m->name, m->update);
} else if (auto m = std::get_if<SubscribeMsg>(&msg.contents)) {
WireEncodeSubscribe(os, Handle{m->subHandle}.GetIndex(), m->topicNames,
m->options);
WireEncodeSubscribe(os, m->subHandle, m->topicNames, m->options);
} else if (auto m = std::get_if<UnsubscribeMsg>(&msg.contents)) {
WireEncodeUnsubscribe(os, Handle{m->subHandle}.GetIndex());
WireEncodeUnsubscribe(os, m->subHandle);
} else {
return false;
}