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
3bcdc372
Commit
3bcdc372
authored
Jul 31, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build errors in debug builds
parent
7e05665f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
libcaf_net/caf/policy/scribe_policy.hpp
libcaf_net/caf/policy/scribe_policy.hpp
+4
-3
No files found.
libcaf_net/caf/policy/scribe_policy.hpp
View file @
3bcdc372
...
@@ -68,9 +68,9 @@ public:
...
@@ -68,9 +68,9 @@ public:
template
<
class
Parent
>
template
<
class
Parent
>
bool
handle_read_event
(
Parent
&
parent
)
{
bool
handle_read_event
(
Parent
&
parent
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
handle_
.
id
())
<<
CAF_ARG
(
len
));
void
*
buf
=
read_buf_
.
data
()
+
collected_
;
void
*
buf
=
read_buf_
.
data
()
+
collected_
;
size_t
len
=
read_threshold_
-
collected_
;
size_t
len
=
read_threshold_
-
collected_
;
CAF_LOG_TRACE
(
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
len
));
auto
rres
=
read
(
handle_
,
buf
,
len
);
auto
rres
=
read
(
handle_
,
buf
,
len
);
if
(
rres
.
is
<
caf
::
sec
>
())
{
if
(
rres
.
is
<
caf
::
sec
>
())
{
// Make sure WSAGetLastError gets called immediately on Windows.
// Make sure WSAGetLastError gets called immediately on Windows.
...
@@ -107,10 +107,10 @@ public:
...
@@ -107,10 +107,10 @@ public:
template
<
class
Parent
>
template
<
class
Parent
>
bool
write_some
(
Parent
&
parent
)
{
bool
write_some
(
Parent
&
parent
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
fd
)
<<
CAF_ARG
(
len
));
if
(
write_buf_
.
empty
())
return
false
;
if
(
write_buf_
.
empty
())
return
false
;
auto
len
=
write_buf_
.
size
()
-
written_
;
auto
len
=
write_buf_
.
size
()
-
written_
;
void
*
buf
=
write_buf_
.
data
()
+
written_
;
void
*
buf
=
write_buf_
.
data
()
+
written_
;
CAF_LOG_TRACE
(
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
len
));
auto
sres
=
net
::
write
(
handle_
,
buf
,
len
);
auto
sres
=
net
::
write
(
handle_
,
buf
,
len
);
if
(
sres
.
is
<
caf
::
sec
>
())
{
if
(
sres
.
is
<
caf
::
sec
>
())
{
CAF_LOG_ERROR
(
"send failed"
);
CAF_LOG_ERROR
(
"send failed"
);
...
@@ -118,7 +118,8 @@ public:
...
@@ -118,7 +118,8 @@ public:
return
false
;
return
false
;
}
}
CAF_LOG_DEBUG
(
CAF_ARG
(
len
)
<<
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
sres
));
CAF_LOG_DEBUG
(
CAF_ARG
(
len
)
<<
CAF_ARG
(
handle_
.
id
)
<<
CAF_ARG
(
sres
));
auto
result
=
(
get
<
size_t
>
(
sres
)
>
0
)
?
static_cast
<
size_t
>
(
get
<
size_t
>
(
sres
))
:
0
;
auto
result
=
(
get
<
size_t
>
(
sres
)
>
0
)
?
static_cast
<
size_t
>
(
get
<
size_t
>
(
sres
))
:
0
;
// update state
// update state
written_
+=
result
;
written_
+=
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