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
88646438
Commit
88646438
authored
May 30, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: differing parameter names between declaration and definition
Solution: harmonize
parent
6c67fca7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
mechanism.cpp
src/mechanism.cpp
+10
-10
No files found.
src/mechanism.cpp
View file @
88646438
...
...
@@ -60,12 +60,12 @@ void zmq::mechanism_t::peer_routing_id (msg_t *msg_)
msg_
->
set_flags
(
msg_t
::
routing_id
);
}
void
zmq
::
mechanism_t
::
set_user_id
(
const
void
*
data
_
,
size_t
size_
)
void
zmq
::
mechanism_t
::
set_user_id
(
const
void
*
user_id
_
,
size_t
size_
)
{
_user_id
.
set
(
static_cast
<
const
unsigned
char
*>
(
data
_
),
size_
);
_user_id
.
set
(
static_cast
<
const
unsigned
char
*>
(
user_id
_
),
size_
);
_zap_properties
.
ZMQ_MAP_INSERT_OR_EMPLACE
(
std
::
string
(
ZMQ_MSG_PROPERTY_USER_ID
),
std
::
string
(
reinterpret_cast
<
const
char
*>
(
data
_
),
size_
));
std
::
string
(
reinterpret_cast
<
const
char
*>
(
user_id
_
),
size_
));
}
const
zmq
::
blob_t
&
zmq
::
mechanism_t
::
get_user_id
()
const
...
...
@@ -159,20 +159,20 @@ size_t zmq::mechanism_t::property_len (const char *name_, size_t value_len_)
#define ZMTP_PROPERTY_SOCKET_TYPE "Socket-Type"
#define ZMTP_PROPERTY_IDENTITY "Identity"
size_t
zmq
::
mechanism_t
::
add_basic_properties
(
unsigned
char
*
buf
_
,
size_t
buf
_capacity_
)
const
size_t
zmq
::
mechanism_t
::
add_basic_properties
(
unsigned
char
*
ptr
_
,
size_t
ptr
_capacity_
)
const
{
unsigned
char
*
ptr
=
buf
_
;
unsigned
char
*
ptr
=
ptr
_
;
// Add socket type property
const
char
*
socket_type
=
socket_type_string
(
options
.
type
);
ptr
+=
add_property
(
ptr
,
buf
_capacity_
,
ZMTP_PROPERTY_SOCKET_TYPE
,
ptr
+=
add_property
(
ptr
,
ptr
_capacity_
,
ZMTP_PROPERTY_SOCKET_TYPE
,
socket_type
,
strlen
(
socket_type
));
// Add identity (aka routing id) property
if
(
options
.
type
==
ZMQ_REQ
||
options
.
type
==
ZMQ_DEALER
||
options
.
type
==
ZMQ_ROUTER
)
{
ptr
+=
add_property
(
ptr
,
buf_capacity_
-
(
ptr
-
buf
_
),
ptr
+=
add_property
(
ptr
,
ptr_capacity_
-
(
ptr
-
ptr
_
),
ZMTP_PROPERTY_IDENTITY
,
options
.
routing_id
,
options
.
routing_id_size
);
}
...
...
@@ -182,10 +182,10 @@ size_t zmq::mechanism_t::add_basic_properties (unsigned char *buf_,
options
.
app_metadata
.
begin
();
it
!=
options
.
app_metadata
.
end
();
++
it
)
ptr
+=
add_property
(
ptr
,
buf_capacity_
-
(
ptr
-
buf
_
),
it
->
first
.
c_str
(),
add_property
(
ptr
,
ptr_capacity_
-
(
ptr
-
ptr
_
),
it
->
first
.
c_str
(),
it
->
second
.
c_str
(),
strlen
(
it
->
second
.
c_str
()));
return
ptr
-
buf
_
;
return
ptr
-
ptr
_
;
}
size_t
zmq
::
mechanism_t
::
basic_properties_len
()
const
...
...
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