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
0ebed80d
Commit
0ebed80d
authored
Dec 30, 2016
by
Luca Boccassi
Committed by
GitHub
Dec 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2281 from vtellier/master
Code formatting + reverted hard error handshake fail
parents
0ad600c7
48bc75e8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
16 deletions
+21
-16
zmq.h
include/zmq.h
+5
-3
curve_server.cpp
src/curve_server.cpp
+6
-7
socket_base.cpp
src/socket_base.cpp
+2
-2
socket_base.hpp
src/socket_base.hpp
+1
-1
stream_engine.cpp
src/stream_engine.cpp
+2
-2
zmq_draft.h
src/zmq_draft.h
+5
-1
No files found.
include/zmq.h
View file @
0ebed80d
...
@@ -417,8 +417,6 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property);
...
@@ -417,8 +417,6 @@ ZMQ_EXPORT const char *zmq_msg_gets (zmq_msg_t *msg, const char *property);
#define ZMQ_EVENT_CLOSE_FAILED 0x0100
#define ZMQ_EVENT_CLOSE_FAILED 0x0100
#define ZMQ_EVENT_DISCONNECTED 0x0200
#define ZMQ_EVENT_DISCONNECTED 0x0200
#define ZMQ_EVENT_MONITOR_STOPPED 0x0400
#define ZMQ_EVENT_MONITOR_STOPPED 0x0400
#define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
#define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
#define ZMQ_EVENT_ALL 0xFFFF
#define ZMQ_EVENT_ALL 0xFFFF
ZMQ_EXPORT
void
*
zmq_socket
(
void
*
,
int
type
);
ZMQ_EXPORT
void
*
zmq_socket
(
void
*
,
int
type
);
...
@@ -563,7 +561,11 @@ ZMQ_EXPORT void zmq_threadclose (void* thread);
...
@@ -563,7 +561,11 @@ ZMQ_EXPORT void zmq_threadclose (void* thread);
#define ZMQ_SCATTER 17
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
#define ZMQ_DGRAM 18
/* DRAFT Context options */
/* DRAFT 0MQ socket events and monitoring */
#define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
#define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
/* DRAFT Context options */
#define ZMQ_MSG_T_SIZE 6
#define ZMQ_MSG_T_SIZE 6
/* DRAFT Socket methods. */
/* DRAFT Socket methods. */
...
...
src/curve_server.cpp
View file @
0ebed80d
...
@@ -310,14 +310,13 @@ int zmq::curve_server_t::process_hello (msg_t *msg_)
...
@@ -310,14 +310,13 @@ int zmq::curve_server_t::process_hello (msg_t *msg_)
sizeof
hello_box
,
sizeof
hello_box
,
hello_nonce
,
cn_client
,
secret_key
);
hello_nonce
,
cn_client
,
secret_key
);
if
(
rc
!=
0
)
{
if
(
rc
!=
0
)
{
//
Hard error, the client knows a wrong server public key, it shall not try to reconnect using the same.
//
Temporary support for security debugging
status_code
=
"100"
;
puts
(
"CURVE I: cannot open client HELLO -- wrong server key?"
);
state
=
send_error
;
errno
=
EPROTO
;
r
c
=
0
;
r
eturn
-
1
;
}
}
else
state
=
send_welcome
;
state
=
send_welcome
;
return
rc
;
return
rc
;
}
}
...
...
src/socket_base.cpp
View file @
0ebed80d
...
@@ -1680,12 +1680,12 @@ void zmq::socket_base_t::event_disconnected (const std::string &addr_, zmq::fd_t
...
@@ -1680,12 +1680,12 @@ void zmq::socket_base_t::event_disconnected (const std::string &addr_, zmq::fd_t
void
zmq
::
socket_base_t
::
event_handshake_failed
(
const
std
::
string
&
addr_
,
int
err_
)
void
zmq
::
socket_base_t
::
event_handshake_failed
(
const
std
::
string
&
addr_
,
int
err_
)
{
{
event
(
addr_
,
err_
,
ZMQ_EVENT_HANDSHAKE_FAILED
);
event
(
addr_
,
err_
,
ZMQ_EVENT_HANDSHAKE_FAILED
);
}
}
void
zmq
::
socket_base_t
::
event_handshake_succeed
(
const
std
::
string
&
addr_
,
int
err_
)
void
zmq
::
socket_base_t
::
event_handshake_succeed
(
const
std
::
string
&
addr_
,
int
err_
)
{
{
event
(
addr_
,
err_
,
ZMQ_EVENT_HANDSHAKE_SUCCEED
);
event
(
addr_
,
err_
,
ZMQ_EVENT_HANDSHAKE_SUCCEED
);
}
}
void
zmq
::
socket_base_t
::
event
(
const
std
::
string
&
addr_
,
intptr_t
value_
,
int
type_
)
void
zmq
::
socket_base_t
::
event
(
const
std
::
string
&
addr_
,
intptr_t
value_
,
int
type_
)
...
...
src/socket_base.hpp
View file @
0ebed80d
...
@@ -134,7 +134,7 @@ namespace zmq
...
@@ -134,7 +134,7 @@ namespace zmq
void
event_close_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_close_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_disconnected
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_disconnected
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_handshake_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_succeed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_succeed
(
const
std
::
string
&
addr_
,
int
err_
);
protected
:
protected
:
...
...
src/stream_engine.cpp
View file @
0ebed80d
...
@@ -790,8 +790,8 @@ int zmq::stream_engine_t::next_handshake_command (msg_t *msg_)
...
@@ -790,8 +790,8 @@ int zmq::stream_engine_t::next_handshake_command (msg_t *msg_)
if
(
rc
==
0
)
if
(
rc
==
0
)
msg_
->
set_flags
(
msg_t
::
command
);
msg_
->
set_flags
(
msg_t
::
command
);
if
(
mechanism
->
status
()
==
mechanism_t
::
error
)
if
(
mechanism
->
status
()
==
mechanism_t
::
error
)
socket
->
event_handshake_failed
(
endpoint
,
0
);
socket
->
event_handshake_failed
(
endpoint
,
0
);
return
rc
;
return
rc
;
}
}
...
...
src/zmq_draft.h
View file @
0ebed80d
...
@@ -46,7 +46,11 @@
...
@@ -46,7 +46,11 @@
#define ZMQ_SCATTER 17
#define ZMQ_SCATTER 17
#define ZMQ_DGRAM 18
#define ZMQ_DGRAM 18
/* DRAFT Context options */
/* DRAFT 0MQ socket events and monitoring */
#define ZMQ_EVENT_HANDSHAKE_FAILED 0x0800
#define ZMQ_EVENT_HANDSHAKE_SUCCEED 0x1000
/* DRAFT Context options */
#define ZMQ_MSG_T_SIZE 6
#define ZMQ_MSG_T_SIZE 6
/* DRAFT Socket methods. */
/* DRAFT Socket methods. */
...
...
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