mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-09 15:53:59 +01:00
Fix monitor_event() to work at all.
There are three versions of monitor_event(), all taking variadic arguments. The original code just has the first one creating a va_list and passing that va_list variadically to the second one... which creates a new va_list and passes it variadically to the third one... and of course everything blows up when we try to pull a non-va_list argument off the stack. The correct approach matches the C standard library's use of printf/vprintf, scanf/vscanf, and so on. Once you make a va_list, you must pass it only to functions which expect a va_list parameter.
This commit is contained in:
@@ -97,7 +97,8 @@ namespace zmq
|
||||
|
||||
// Monitoring specific
|
||||
int monitor (zmq_monitor_fn *monitor_);
|
||||
void monitor_event (zmq::socket_base_t *socket_, int event_, va_list args_);
|
||||
void monitor_event (zmq::socket_base_t *socket_, int event_, ...);
|
||||
void va_monitor_event (zmq::socket_base_t *socket_, int event_, va_list args_);
|
||||
|
||||
enum {
|
||||
term_tid = 0,
|
||||
|
||||
Reference in New Issue
Block a user