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
3cb77e42
Commit
3cb77e42
authored
Aug 09, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use revision_pos constant
parent
758f903d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
stream_engine.cpp
src/stream_engine.cpp
+5
-5
No files found.
src/stream_engine.cpp
View file @
3cb77e42
...
@@ -485,6 +485,9 @@ void zmq::stream_engine_t::restart_input ()
...
@@ -485,6 +485,9 @@ void zmq::stream_engine_t::restart_input ()
}
}
}
}
// Position of the revision field in the greeting.
const
size_t
revision_pos
=
10
;
bool
zmq
::
stream_engine_t
::
handshake
()
bool
zmq
::
stream_engine_t
::
handshake
()
{
{
zmq_assert
(
_handshaking
);
zmq_assert
(
_handshaking
);
...
@@ -495,9 +498,6 @@ bool zmq::stream_engine_t::handshake ()
...
@@ -495,9 +498,6 @@ bool zmq::stream_engine_t::handshake ()
return
false
;
return
false
;
const
bool
unversioned
=
rc
!=
0
;
const
bool
unversioned
=
rc
!=
0
;
// Position of the revision field in the greeting.
const
size_t
revision_pos
=
10
;
if
(
!
(
this
if
(
!
(
this
->*
select_handshake_fun
(
unversioned
,
->*
select_handshake_fun
(
unversioned
,
_greeting_recv
[
revision_pos
]))
())
_greeting_recv
[
revision_pos
]))
())
...
@@ -579,8 +579,8 @@ void zmq::stream_engine_t::receive_greeting_versioned ()
...
@@ -579,8 +579,8 @@ void zmq::stream_engine_t::receive_greeting_versioned ()
set_pollout
(
_handle
);
set_pollout
(
_handle
);
// Use ZMTP/2.0 to talk to older peers.
// Use ZMTP/2.0 to talk to older peers.
if
(
_greeting_recv
[
10
]
==
ZMTP_1_0
if
(
_greeting_recv
[
revision_pos
]
==
ZMTP_1_0
||
_greeting_recv
[
10
]
==
ZMTP_2_0
)
||
_greeting_recv
[
revision_pos
]
==
ZMTP_2_0
)
_outpos
[
_outsize
++
]
=
_options
.
type
;
_outpos
[
_outsize
++
]
=
_options
.
type
;
else
{
else
{
_outpos
[
_outsize
++
]
=
0
;
// Minor version number
_outpos
[
_outsize
++
]
=
0
;
// Minor version number
...
...
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