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
7e2fcfa1
Commit
7e2fcfa1
authored
Jun 16, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remote_lookup, relates #473
parent
66bc4c93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+5
-5
libcaf_io/src/middleman.cpp
libcaf_io/src/middleman.cpp
+5
-2
No files found.
libcaf_io/src/basp_broker.cpp
View file @
7e2fcfa1
...
...
@@ -515,17 +515,17 @@ behavior basp_broker::make_behavior() {
<<
", "
<<
CAF_ARG
(
msg
));
if
(
!
src
)
return
sec
::
cannot_forward_to_invalid_actor
;
auto
path
=
this
->
state
.
instance
.
tbl
().
lookup
(
dest_node
);
if
(
!
path
)
{
CAF_LOG_ERROR
(
"no route to receiving node"
);
return
sec
::
no_route_to_receiving_node
;
}
if
(
system
().
node
()
==
src
->
node
())
system
().
registry
().
put
(
src
->
id
(),
src
);
auto
writer
=
make_callback
([
&
](
serializer
&
sink
)
{
std
::
vector
<
actor_addr
>
stages
;
sink
<<
dest_name
<<
stages
<<
msg
;
});
auto
path
=
this
->
state
.
instance
.
tbl
().
lookup
(
dest_node
);
if
(
!
path
)
{
CAF_LOG_ERROR
(
"no route to receiving node"
);
return
sec
::
no_route_to_receiving_node
;
}
basp
::
header
hdr
{
basp
::
message_type
::
dispatch_message
,
basp
::
header
::
named_receiver_flag
,
0
,
0
,
state
.
this_node
(),
dest_node
,
...
...
libcaf_io/src/middleman.cpp
View file @
7e2fcfa1
...
...
@@ -246,11 +246,14 @@ group middleman::remote_group(const std::string& group_identifier,
strong_actor_ptr
middleman
::
remote_lookup
(
atom_value
name
,
const
node_id
&
nid
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
name
)
<<
CAF_ARG
(
nid
));
if
(
system
().
node
()
==
nid
)
return
system
().
registry
().
get
(
name
);
auto
basp
=
named_broker
<
basp_broker
>
(
atom
(
"BASP"
));
strong_actor_ptr
result
;
scoped_actor
self
{
system
(),
true
};
try
{
self
->
send
(
basp
,
forward_atom
::
value
,
self
.
address
(),
nid
,
name
,
self
->
send
(
basp
,
forward_atom
::
value
,
actor_cast
<
strong_actor_ptr
>
(
self
),
nid
,
name
,
make_message
(
sys_atom
::
value
,
get_atom
::
value
,
"info"
));
self
->
receive
(
[
&
](
ok_atom
,
std
::
string
&
,
strong_actor_ptr
&
addr
,
std
::
string
&
)
{
...
...
@@ -260,7 +263,7 @@ strong_actor_ptr middleman::remote_lookup(atom_value name, const node_id& nid) {
// nop
}
);
}
catch
(
...
)
{
}
catch
(
std
::
exception
&
e
)
{
// nop
}
return
result
;
...
...
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