Commit 74c91604 authored by Kenton Varda's avatar Kenton Varda

Merge pull request #276 from dwrensha/missing-switch

Add missing case analysis in handleUnimplemented().
parents 39a3c346 108e3fc4
...@@ -2037,24 +2037,33 @@ private: ...@@ -2037,24 +2037,33 @@ private:
void handleUnimplemented(const rpc::Message::Reader& message) { void handleUnimplemented(const rpc::Message::Reader& message) {
switch (message.which()) { switch (message.which()) {
case rpc::Message::RESOLVE: { case rpc::Message::RESOLVE: {
auto cap = message.getResolve().getCap(); auto resolve = message.getResolve();
switch (cap.which()) { switch (resolve.which()) {
case rpc::CapDescriptor::NONE: case rpc::Resolve::CAP: {
// Nothing to do (but this ought never to happen). auto cap = resolve.getCap();
break; switch (cap.which()) {
case rpc::CapDescriptor::SENDER_HOSTED: case rpc::CapDescriptor::NONE:
releaseExport(cap.getSenderHosted(), 1); // Nothing to do (but this ought never to happen).
break; break;
case rpc::CapDescriptor::SENDER_PROMISE: case rpc::CapDescriptor::SENDER_HOSTED:
releaseExport(cap.getSenderPromise(), 1); releaseExport(cap.getSenderHosted(), 1);
break;
case rpc::CapDescriptor::SENDER_PROMISE:
releaseExport(cap.getSenderPromise(), 1);
break;
case rpc::CapDescriptor::RECEIVER_ANSWER:
case rpc::CapDescriptor::RECEIVER_HOSTED:
// Nothing to do.
break;
case rpc::CapDescriptor::THIRD_PARTY_HOSTED:
releaseExport(cap.getThirdPartyHosted().getVineId(), 1);
break;
}
break; break;
case rpc::CapDescriptor::RECEIVER_ANSWER: }
case rpc::CapDescriptor::RECEIVER_HOSTED: case rpc::Resolve::EXCEPTION:
// Nothing to do. // Nothing to do.
break; break;
case rpc::CapDescriptor::THIRD_PARTY_HOSTED:
releaseExport(cap.getThirdPartyHosted().getVineId(), 1);
break;
} }
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment