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
2e849a4d
Unverified
Commit
2e849a4d
authored
Feb 08, 2018
by
Luca Boccassi
Committed by
GitHub
Feb 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2913 from ZMQers/add-const
Problem: several fields are non-const without need
parents
9872daa2
368eff9e
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
23 additions
and
20 deletions
+23
-20
address.hpp
src/address.hpp
+1
-1
decoder_allocators.hpp
src/decoder_allocators.hpp
+1
-1
encoder.hpp
src/encoder.hpp
+3
-3
mailbox_safe.hpp
src/mailbox_safe.hpp
+1
-1
mechanism.hpp
src/mechanism.hpp
+1
-1
metadata.hpp
src/metadata.hpp
+1
-1
object.hpp
src/object.hpp
+1
-1
signaler.cpp
src/signaler.cpp
+3
-3
socket_base.hpp
src/socket_base.hpp
+1
-1
stream_engine.hpp
src/stream_engine.hpp
+1
-1
tcp_connecter.cpp
src/tcp_connecter.cpp
+5
-2
tcp_connecter.hpp
src/tcp_connecter.hpp
+3
-3
v1_decoder.hpp
src/v1_decoder.hpp
+1
-1
No files found.
src/address.hpp
View file @
2e849a4d
...
...
@@ -56,7 +56,7 @@ struct address_t
const
std
::
string
protocol
;
const
std
::
string
address
;
ctx_t
*
parent
;
ctx_t
*
const
parent
;
// Protocol specific resolved address
union
...
...
src/decoder_allocators.hpp
View file @
2e849a4d
...
...
@@ -122,7 +122,7 @@ class shared_message_memory_allocator
private
:
unsigned
char
*
buf
;
std
::
size_t
bufsize
;
std
::
size_t
max_size
;
const
std
::
size_t
max_size
;
zmq
::
msg_t
::
content_t
*
msg_content
;
std
::
size_t
maxCounters
;
};
...
...
src/encoder.hpp
View file @
2e849a4d
...
...
@@ -60,9 +60,9 @@ template <typename T> class encoder_base_t : public i_encoder
next
(
NULL
),
new_msg_flag
(
false
),
bufsize
(
bufsize_
),
buf
((
unsigned
char
*
)
malloc
(
bufsize_
)),
in_progress
(
NULL
)
{
buf
=
(
unsigned
char
*
)
malloc
(
bufsize_
);
alloc_assert
(
buf
);
}
...
...
@@ -166,8 +166,8 @@ template <typename T> class encoder_base_t : public i_encoder
bool
new_msg_flag
;
// The buffer for encoded data.
size_t
bufsize
;
unsigned
char
*
buf
;
const
size_t
bufsize
;
unsigned
char
*
const
buf
;
encoder_base_t
(
const
encoder_base_t
&
);
void
operator
=
(
const
encoder_base_t
&
);
...
...
src/mailbox_safe.hpp
View file @
2e849a4d
...
...
@@ -77,7 +77,7 @@ class mailbox_safe_t : public i_mailbox
condition_variable_t
cond_var
;
// Synchronize access to the mailbox from receivers and senders
mutex_t
*
sync
;
mutex_t
*
const
sync
;
std
::
vector
<
zmq
::
signaler_t
*>
signalers
;
...
...
src/mechanism.hpp
View file @
2e849a4d
...
...
@@ -128,7 +128,7 @@ class mechanism_t
// Properties received from ZAP server.
metadata_t
::
dict_t
zap_properties
;
options_t
options
;
const
options_t
options
;
private
:
blob_t
routing_id
;
...
...
src/metadata.hpp
View file @
2e849a4d
...
...
@@ -62,7 +62,7 @@ class metadata_t
atomic_counter_t
ref_cnt
;
// Dictionary holding metadata.
dict_t
dict
;
const
dict_t
dict
;
};
}
...
...
src/object.hpp
View file @
2e849a4d
...
...
@@ -134,7 +134,7 @@ class object_t
private
:
// Context provides access to the global state.
zmq
::
ctx_t
*
ctx
;
zmq
::
ctx_t
*
c
onst
c
tx
;
// Thread ID of the thread the object belongs to.
uint32_t
tid
;
...
...
src/signaler.cpp
View file @
2e849a4d
...
...
@@ -670,9 +670,9 @@ int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_)
*
w_
=
*
r_
=
-
1
;
return
-
1
;
}
else
{
// If there's no SOCK_CLOEXEC, let's try the second best option. Note that
// race condition can cause socket not to be closed (if fork happens
// between socket creation and this point).
// If there's no SOCK_CLOEXEC, let's try the second best option. Note that
// race condition can cause socket not to be closed (if fork happens
// between socket creation and this point).
#if !defined ZMQ_HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC
rc
=
fcntl
(
sv
[
0
],
F_SETFD
,
FD_CLOEXEC
);
errno_assert
(
rc
!=
-
1
);
...
...
src/socket_base.hpp
View file @
2e849a4d
...
...
@@ -285,7 +285,7 @@ class socket_base_t : public own_t,
std
::
string
last_endpoint
;
// Indicate if the socket is thread safe
bool
thread_safe
;
const
bool
thread_safe
;
// Signaler to be used in the reaping stage
signaler_t
*
reaper_signaler
;
...
...
src/stream_engine.hpp
View file @
2e849a4d
...
...
@@ -178,7 +178,7 @@ class stream_engine_t : public io_object_t, public i_engine
// The session this engine is attached to.
zmq
::
session_base_t
*
session
;
options_t
options
;
const
options_t
options
;
// String representation of endpoint
std
::
string
endpoint
;
...
...
src/tcp_connecter.cpp
View file @
2e849a4d
...
...
@@ -72,12 +72,15 @@ zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_,
connect_timer_started
(
false
),
reconnect_timer_started
(
false
),
session
(
session_
),
current_reconnect_ivl
(
options
.
reconnect_ivl
)
current_reconnect_ivl
(
options
.
reconnect_ivl
),
socket
(
session
->
get_socket
())
{
zmq_assert
(
addr
);
zmq_assert
(
addr
->
protocol
==
"tcp"
);
addr
->
to_string
(
endpoint
);
socket
=
session
->
get_socket
();
// TODO the return value is unused! what if it fails? if this is impossible
// or does not matter, change such that endpoint in initialized using an
// initializer, and make endpoint const
}
zmq
::
tcp_connecter_t
::~
tcp_connecter_t
()
...
...
src/tcp_connecter.hpp
View file @
2e849a4d
...
...
@@ -97,7 +97,7 @@ class tcp_connecter_t : public own_t, public io_object_t
fd_t
connect
();
// Address to connect to. Owned by session_base_t.
address_t
*
addr
;
address_t
*
const
addr
;
// Underlying socket.
fd_t
s
;
...
...
@@ -117,7 +117,7 @@ class tcp_connecter_t : public own_t, public io_object_t
bool
reconnect_timer_started
;
// Reference to the session we belong to.
zmq
::
session_base_t
*
session
;
zmq
::
session_base_t
*
const
session
;
// Current reconnect ivl, updated for backoff strategy
int
current_reconnect_ivl
;
...
...
@@ -126,7 +126,7 @@ class tcp_connecter_t : public own_t, public io_object_t
std
::
string
endpoint
;
// Socket
zmq
::
socket_base_t
*
socket
;
zmq
::
socket_base_t
*
const
socket
;
tcp_connecter_t
(
const
tcp_connecter_t
&
);
const
tcp_connecter_t
&
operator
=
(
const
tcp_connecter_t
&
);
...
...
src/v1_decoder.hpp
View file @
2e849a4d
...
...
@@ -54,7 +54,7 @@ class v1_decoder_t : public zmq::c_single_allocator,
unsigned
char
tmpbuf
[
8
];
msg_t
in_progress
;
int64_t
maxmsgsize
;
const
int64_t
maxmsgsize
;
v1_decoder_t
(
const
v1_decoder_t
&
);
void
operator
=
(
const
v1_decoder_t
&
);
...
...
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