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
18da8a74
Commit
18da8a74
authored
Apr 23, 2014
by
Chris Busbey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encode and decode ready message
parent
2e1645a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
gssapi_mechanism_base.cpp
src/gssapi_mechanism_base.cpp
+6
-2
gssapi_mechanism_base.hpp
src/gssapi_mechanism_base.hpp
+1
-1
No files found.
src/gssapi_mechanism_base.cpp
View file @
18da8a74
...
@@ -249,7 +249,7 @@ int zmq::gssapi_mechanism_base_t::process_initiate (msg_t *msg_, void **token_va
...
@@ -249,7 +249,7 @@ int zmq::gssapi_mechanism_base_t::process_initiate (msg_t *msg_, void **token_va
return
0
;
return
0
;
}
}
int
zmq
::
gssapi_mechanism_base_t
::
produce_ready
(
msg_t
*
msg_
)
const
int
zmq
::
gssapi_mechanism_base_t
::
produce_ready
(
msg_t
*
msg_
)
{
{
unsigned
char
*
const
command_buffer
=
(
unsigned
char
*
)
malloc
(
512
);
unsigned
char
*
const
command_buffer
=
(
unsigned
char
*
)
malloc
(
512
);
alloc_assert
(
command_buffer
);
alloc_assert
(
command_buffer
);
...
@@ -278,11 +278,15 @@ int zmq::gssapi_mechanism_base_t::produce_ready (msg_t *msg_) const
...
@@ -278,11 +278,15 @@ int zmq::gssapi_mechanism_base_t::produce_ready (msg_t *msg_) const
memcpy
(
msg_
->
data
(),
command_buffer
,
command_size
);
memcpy
(
msg_
->
data
(),
command_buffer
,
command_size
);
free
(
command_buffer
);
free
(
command_buffer
);
return
0
;
return
encode_message
(
msg_
)
;
}
}
int
zmq
::
gssapi_mechanism_base_t
::
process_ready
(
msg_t
*
msg_
)
int
zmq
::
gssapi_mechanism_base_t
::
process_ready
(
msg_t
*
msg_
)
{
{
const
int
rc
=
decode_message
(
msg_
);
if
(
rc
!=
0
)
return
rc
;
const
unsigned
char
*
ptr
=
static_cast
<
unsigned
char
*>
(
msg_
->
data
());
const
unsigned
char
*
ptr
=
static_cast
<
unsigned
char
*>
(
msg_
->
data
());
size_t
bytes_left
=
msg_
->
size
();
size_t
bytes_left
=
msg_
->
size
();
...
...
src/gssapi_mechanism_base.hpp
View file @
18da8a74
...
@@ -52,7 +52,7 @@ namespace zmq
...
@@ -52,7 +52,7 @@ namespace zmq
int
process_initiate
(
msg_t
*
msg_
,
void
**
data_
,
size_t
&
data_len_
);
int
process_initiate
(
msg_t
*
msg_
,
void
**
data_
,
size_t
&
data_len_
);
// Produce a metadata ready msg (READY) to conclude handshake
// Produce a metadata ready msg (READY) to conclude handshake
int
produce_ready
(
msg_t
*
msg_
)
const
;
int
produce_ready
(
msg_t
*
msg_
);
// Process a metadata ready msg (READY)
// Process a metadata ready msg (READY)
int
process_ready
(
msg_t
*
msg_
);
int
process_ready
(
msg_t
*
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