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:
void handleUnimplemented(const rpc::Message::Reader& message) {
switch (message.which()) {
case rpc::Message::RESOLVE: {
auto cap = message.getResolve().getCap();
switch (cap.which()) {
case rpc::CapDescriptor::NONE:
// Nothing to do (but this ought never to happen).
break;
case rpc::CapDescriptor::SENDER_HOSTED:
releaseExport(cap.getSenderHosted(), 1);
break;
case rpc::CapDescriptor::SENDER_PROMISE:
releaseExport(cap.getSenderPromise(), 1);
auto resolve = message.getResolve();
switch (resolve.which()) {
case rpc::Resolve::CAP: {
auto cap = resolve.getCap();
switch (cap.which()) {
case rpc::CapDescriptor::NONE:
// Nothing to do (but this ought never to happen).
break;
case rpc::CapDescriptor::SENDER_HOSTED:
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;
case rpc::CapDescriptor::RECEIVER_ANSWER:
case rpc::CapDescriptor::RECEIVER_HOSTED:
}
case rpc::Resolve::EXCEPTION:
// Nothing to do.
break;
case rpc::CapDescriptor::THIRD_PARTY_HOSTED:
releaseExport(cap.getThirdPartyHosted().getVineId(), 1);
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