Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
9565db6f
Commit
9565db6f
authored
Apr 05, 2019
by
Da Zheng
Committed by
Chao Ma
Apr 06, 2019
Browse files
fix warning. (#479)
parent
4ea42e3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
src/graph/network/msg_queue.h
src/graph/network/msg_queue.h
+1
-1
src/graph/network/socket_communicator.cc
src/graph/network/socket_communicator.cc
+3
-3
No files found.
src/graph/network/msg_queue.h
View file @
9565db6f
...
@@ -134,7 +134,7 @@ class MessageQueue {
...
@@ -134,7 +134,7 @@ class MessageQueue {
/*!
/*!
* \brief Used to check all producers will no longer produce anything
* \brief Used to check all producers will no longer produce anything
*/
*/
in
t
num_producers_
;
size_
t
num_producers_
;
/*!
/*!
* \brief Messages in the queue
* \brief Messages in the queue
...
...
src/graph/network/socket_communicator.cc
View file @
9565db6f
...
@@ -113,7 +113,7 @@ void SocketCommunicator::MsgHandler(TCPSocket* socket, MessageQueue* queue) {
...
@@ -113,7 +113,7 @@ void SocketCommunicator::MsgHandler(TCPSocket* socket, MessageQueue* queue) {
// First recv the size
// First recv the size
int64_t
received_bytes
=
0
;
int64_t
received_bytes
=
0
;
int64_t
data_size
=
0
;
int64_t
data_size
=
0
;
while
(
received_bytes
<
sizeof
(
int64_t
))
{
while
(
static_cast
<
size_t
>
(
received_bytes
)
<
sizeof
(
int64_t
))
{
int64_t
max_len
=
sizeof
(
int64_t
)
-
received_bytes
;
int64_t
max_len
=
sizeof
(
int64_t
)
-
received_bytes
;
int64_t
tmp
=
socket
->
Receive
(
int64_t
tmp
=
socket
->
Receive
(
reinterpret_cast
<
char
*>
(
&
data_size
)
+
received_bytes
,
reinterpret_cast
<
char
*>
(
&
data_size
)
+
received_bytes
,
...
@@ -150,7 +150,7 @@ void SocketCommunicator::FinalizeSender() {
...
@@ -150,7 +150,7 @@ void SocketCommunicator::FinalizeSender() {
if
(
socket_
[
0
]
!=
nullptr
)
{
if
(
socket_
[
0
]
!=
nullptr
)
{
int64_t
size
=
-
1
;
int64_t
size
=
-
1
;
int64_t
sent_bytes
=
0
;
int64_t
sent_bytes
=
0
;
while
(
sent_bytes
<
sizeof
(
int64_t
))
{
while
(
static_cast
<
size_t
>
(
sent_bytes
)
<
sizeof
(
int64_t
))
{
int64_t
max_len
=
sizeof
(
int64_t
)
-
sent_bytes
;
int64_t
max_len
=
sizeof
(
int64_t
)
-
sent_bytes
;
int64_t
tmp
=
socket_
[
0
]
->
Send
(
int64_t
tmp
=
socket_
[
0
]
->
Send
(
reinterpret_cast
<
char
*>
(
&
size
)
+
sent_bytes
,
reinterpret_cast
<
char
*>
(
&
size
)
+
sent_bytes
,
...
@@ -185,7 +185,7 @@ int64_t SocketCommunicator::Send(char* src, int64_t size) {
...
@@ -185,7 +185,7 @@ int64_t SocketCommunicator::Send(char* src, int64_t size) {
TCPSocket
*
client
=
socket_
[
0
];
TCPSocket
*
client
=
socket_
[
0
];
// First sent the size of data
// First sent the size of data
int64_t
sent_bytes
=
0
;
int64_t
sent_bytes
=
0
;
while
(
sent_bytes
<
sizeof
(
int64_t
))
{
while
(
static_cast
<
size_t
>
(
sent_bytes
)
<
sizeof
(
int64_t
))
{
int64_t
max_len
=
sizeof
(
int64_t
)
-
sent_bytes
;
int64_t
max_len
=
sizeof
(
int64_t
)
-
sent_bytes
;
int64_t
tmp
=
client
->
Send
(
int64_t
tmp
=
client
->
Send
(
reinterpret_cast
<
char
*>
(
&
size
)
+
sent_bytes
,
reinterpret_cast
<
char
*>
(
&
size
)
+
sent_bytes
,
...
...
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