Commit 108e3fc4 authored by David Renshaw's avatar David Renshaw

Add missing case analysis in handleUnimplemented().

parent 00aed556
......@@ -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