Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
74c91604
Commit
74c91604
authored
Jan 07, 2016
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #276 from dwrensha/missing-switch
Add missing case analysis in handleUnimplemented().
parents
39a3c346
108e3fc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
rpc.c++
c++/src/capnp/rpc.c++
+24
-15
No files found.
c++/src/capnp/rpc.c++
View file @
74c91604
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment