Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
6a5051fa
Unverified
Commit
6a5051fa
authored
May 17, 2018
by
Luca Boccassi
Committed by
GitHub
May 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3114 from sigiesec/fix-some-style-issues
Fix some code style issues
parents
cbd52feb
e19823d8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
9 deletions
+18
-9
blob.hpp
src/blob.hpp
+1
-1
dealer.cpp
src/dealer.cpp
+2
-0
decoder_allocators.cpp
src/decoder_allocators.cpp
+7
-3
decoder_allocators.hpp
src/decoder_allocators.hpp
+2
-0
mailbox.cpp
src/mailbox.cpp
+1
-1
mailbox_safe.cpp
src/mailbox_safe.cpp
+1
-1
rep.cpp
src/rep.cpp
+1
-1
req.cpp
src/req.cpp
+3
-2
No files found.
src/blob.hpp
View file @
6a5051fa
...
...
@@ -72,7 +72,7 @@ struct blob_t
blob_t
()
:
data_
(
0
),
size_
(
0
),
owned_
(
true
)
{}
// Creates a blob_t of a given size, with uninitialized content.
blob_t
(
const
size_t
size
)
:
explicit
blob_t
(
const
size_t
size
)
:
data_
((
unsigned
char
*
)
malloc
(
size
)),
size_
(
size
),
owned_
(
true
)
...
...
src/dealer.cpp
View file @
6a5051fa
...
...
@@ -57,6 +57,8 @@ void zmq::dealer_t::xattach_pipe (pipe_t *pipe_, bool subscribe_to_all_)
rc
=
pipe_
->
write
(
&
probe_msg_
);
// zmq_assert (rc) is not applicable here, since it is not a bug.
(
void
)
rc
;
pipe_
->
flush
();
rc
=
probe_msg_
.
close
();
...
...
src/decoder_allocators.cpp
View file @
6a5051fa
...
...
@@ -108,17 +108,21 @@ void zmq::shared_message_memory_allocator::deallocate ()
if
(
buf
&&
!
c
->
sub
(
1
))
{
std
::
free
(
buf
);
}
release
();
clear
();
}
unsigned
char
*
zmq
::
shared_message_memory_allocator
::
release
()
{
unsigned
char
*
b
=
buf
;
clear
();
return
b
;
}
void
zmq
::
shared_message_memory_allocator
::
clear
()
{
buf
=
NULL
;
bufsize
=
0
;
msg_content
=
NULL
;
return
b
;
}
void
zmq
::
shared_message_memory_allocator
::
inc_ref
()
...
...
src/decoder_allocators.hpp
View file @
6a5051fa
...
...
@@ -120,6 +120,8 @@ class shared_message_memory_allocator
void
advance_content
()
{
msg_content
++
;
}
private
:
void
clear
();
unsigned
char
*
buf
;
std
::
size_t
bufsize
;
const
std
::
size_t
max_size
;
...
...
src/mailbox.cpp
View file @
6a5051fa
...
...
@@ -36,7 +36,7 @@ zmq::mailbox_t::mailbox_t ()
// Get the pipe into passive state. That way, if the users starts by
// polling on the associated file descriptor it will get woken up when
// new command is posted.
const
bool
ok
=
cpipe
.
read
(
NULL
);
const
bool
ok
=
cpipe
.
check_read
(
);
zmq_assert
(
!
ok
);
active
=
false
;
}
...
...
src/mailbox_safe.cpp
View file @
6a5051fa
...
...
@@ -37,7 +37,7 @@ zmq::mailbox_safe_t::mailbox_safe_t (mutex_t *sync_) : sync (sync_)
// Get the pipe into passive state. That way, if the users starts by
// polling on the associated file descriptor it will get woken up when
// new command is posted.
const
bool
ok
=
cpipe
.
read
(
NULL
);
const
bool
ok
=
cpipe
.
check_read
(
);
zmq_assert
(
!
ok
);
}
...
...
src/rep.cpp
View file @
6a5051fa
...
...
@@ -52,7 +52,7 @@ int zmq::rep_t::xsend (msg_t *msg_)
return
-
1
;
}
bool
more
=
msg_
->
flags
()
&
msg_t
::
more
?
true
:
false
;
bool
more
=
(
msg_
->
flags
()
&
msg_t
::
more
)
!=
0
;
// Push message to the reply pipe.
int
rc
=
router_t
::
xsend
(
msg_
);
...
...
src/req.cpp
View file @
6a5051fa
...
...
@@ -126,7 +126,7 @@ int zmq::req_t::xsend (msg_t *msg_)
}
}
bool
more
=
msg_
->
flags
()
&
msg_t
::
more
?
true
:
false
;
bool
more
=
(
msg_
->
flags
()
&
msg_t
::
more
)
!=
0
;
int
rc
=
dealer_t
::
xsend
(
msg_
);
if
(
rc
!=
0
)
...
...
@@ -299,7 +299,8 @@ int zmq::req_session_t::push_msg (msg_t *msg_)
if
(
msg_
->
size
()
==
sizeof
(
uint32_t
))
{
state
=
request_id
;
return
session_base_t
::
push_msg
(
msg_
);
}
else
if
(
msg_
->
size
()
==
0
)
{
}
if
(
msg_
->
size
()
==
0
)
{
state
=
body
;
return
session_base_t
::
push_msg
(
msg_
);
}
...
...
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