Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
093f8e2f
Commit
093f8e2f
authored
Nov 12, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix basp::application test
parent
cdea6c3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
libcaf_net/caf/net/basp/application.hpp
libcaf_net/caf/net/basp/application.hpp
+1
-1
libcaf_net/src/application.cpp
libcaf_net/src/application.cpp
+8
-11
No files found.
libcaf_net/caf/net/basp/application.hpp
View file @
093f8e2f
...
@@ -191,7 +191,7 @@ private:
...
@@ -191,7 +191,7 @@ private:
std
::
unordered_set
<
actor_addr
>
monitored_actors_
;
// TODO: this is unused
std
::
unordered_set
<
actor_addr
>
monitored_actors_
;
// TODO: this is unused
/// Caches actor handles obtained via `resolve`.
/// Caches actor handles obtained via `resolve`.
std
::
unordered_map
<
uint64_t
,
response_promise
>
pending_resolves_
;
std
::
unordered_map
<
uint64_t
,
actor
>
pending_resolves_
;
/// Ascending ID generator for requests to our peer.
/// Ascending ID generator for requests to our peer.
uint64_t
next_request_id_
=
1
;
uint64_t
next_request_id_
=
1
;
...
...
libcaf_net/src/application.cpp
View file @
093f8e2f
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
#include "caf/no_stages.hpp"
#include "caf/no_stages.hpp"
#include "caf/none.hpp"
#include "caf/none.hpp"
#include "caf/sec.hpp"
#include "caf/sec.hpp"
#include "caf/send.hpp"
#include "caf/serializer_impl.hpp"
#include "caf/serializer_impl.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/type_erased_tuple.hpp"
#include "caf/type_erased_tuple.hpp"
...
@@ -96,9 +97,7 @@ void application::resolve(packet_writer& writer, string_view path,
...
@@ -96,9 +97,7 @@ void application::resolve(packet_writer& writer, string_view path,
static_cast
<
uint32_t
>
(
payload
.
size
()),
req_id
},
static_cast
<
uint32_t
>
(
payload
.
size
()),
req_id
},
hdr
);
hdr
);
writer
.
write_packet
(
hdr
,
payload
);
writer
.
write_packet
(
hdr
,
payload
);
response_promise
rp
{
nullptr
,
actor_cast
<
strong_actor_ptr
>
(
listener
),
pending_resolves_
.
emplace
(
req_id
,
listener
);
no_stages
,
make_message_id
()};
pending_resolves_
.
emplace
(
req_id
,
std
::
move
(
rp
));
}
}
void
application
::
new_proxy
(
packet_writer
&
writer
,
actor_id
id
)
{
void
application
::
new_proxy
(
packet_writer
&
writer
,
actor_id
id
)
{
...
@@ -332,21 +331,19 @@ error application::handle_resolve_response(packet_writer&, header received_hdr,
...
@@ -332,21 +331,19 @@ error application::handle_resolve_response(packet_writer&, header received_hdr,
CAF_LOG_ERROR
(
"received unknown ID in resolve_response message"
);
CAF_LOG_ERROR
(
"received unknown ID in resolve_response message"
);
return
none
;
return
none
;
}
}
auto
guard
=
detail
::
make_scope_guard
([
&
]
{
auto
guard
=
detail
::
make_scope_guard
([
&
]
{
pending_resolves_
.
erase
(
i
);
});
if
(
i
->
second
.
pending
())
i
->
second
.
deliver
(
sec
::
remote_lookup_failed
);
pending_resolves_
.
erase
(
i
);
});
actor_id
aid
;
actor_id
aid
;
std
::
set
<
std
::
string
>
ifs
;
std
::
set
<
std
::
string
>
ifs
;
binary_deserializer
source
{
&
executor_
,
received
};
binary_deserializer
source
{
&
executor_
,
received
};
if
(
auto
err
=
source
(
aid
,
ifs
))
if
(
auto
err
=
source
(
aid
,
ifs
))
{
anon_send
(
i
->
second
,
sec
::
remote_lookup_failed
);
return
err
;
return
err
;
}
if
(
aid
==
0
)
{
if
(
aid
==
0
)
{
i
->
second
.
deliver
(
strong_actor_ptr
{
nullptr
},
std
::
move
(
ifs
));
anon_send
(
i
->
second
,
strong_actor_ptr
{
nullptr
},
std
::
move
(
ifs
));
return
none
;
return
none
;
}
}
i
->
second
.
deliver
(
proxies_
.
get_or_put
(
peer_id_
,
aid
),
std
::
move
(
ifs
));
anon_send
(
i
->
second
,
proxies_
.
get_or_put
(
peer_id_
,
aid
),
std
::
move
(
ifs
));
return
none
;
return
none
;
}
}
...
...
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