Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
e5617b20
Commit
e5617b20
authored
Mar 03, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect against nullptr access in ack_open handler
parent
b566ee21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
libcaf_core/caf/stream_manager.hpp
libcaf_core/caf/stream_manager.hpp
+1
-1
libcaf_core/src/stream_manager.cpp
libcaf_core/src/stream_manager.cpp
+4
-1
No files found.
libcaf_core/caf/stream_manager.hpp
View file @
e5617b20
...
...
@@ -70,7 +70,7 @@ public:
virtual
void
handle
(
inbound_path
*
from
,
downstream_msg
::
forced_close
&
x
);
virtual
void
handle
(
stream_slots
,
upstream_msg
::
ack_open
&
x
);
virtual
bool
handle
(
stream_slots
,
upstream_msg
::
ack_open
&
x
);
virtual
void
handle
(
stream_slots
slots
,
upstream_msg
::
ack_batch
&
x
);
...
...
libcaf_core/src/stream_manager.cpp
View file @
e5617b20
...
...
@@ -58,14 +58,17 @@ void stream_manager::handle(inbound_path*, downstream_msg::forced_close& x) {
abort
(
std
::
move
(
x
.
reason
));
}
void
stream_manager
::
handle
(
stream_slots
slots
,
upstream_msg
::
ack_open
&
x
)
{
bool
stream_manager
::
handle
(
stream_slots
slots
,
upstream_msg
::
ack_open
&
x
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
slots
)
<<
CAF_ARG
(
x
));
auto
path
=
out
().
add_path
(
slots
.
invert
(),
x
.
rebind_to
);
if
(
path
==
nullptr
)
return
false
;
path
->
open_credit
=
x
.
initial_demand
;
path
->
desired_batch_size
=
x
.
desired_batch_size
;
--
pending_handshakes_
;
push
();
in_flight_promises_
.
erase
(
slots
.
sender
);
return
true
;
}
void
stream_manager
::
handle
(
stream_slots
slots
,
upstream_msg
::
ack_batch
&
x
)
{
...
...
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