From 61ee6fae536a8000be87b5aaf271f6519a3b7d3f Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Mon, 1 Mar 2010 10:13:26 +0100 Subject: Implement flow control This commit introduces the necessary changes necessary for implementing flow control. None of the socket types implements the flow control yet. The code will crash when the flow control is enabled and the thw lwm is reached. The following commits will add flow-control support for individual socket types. --- src/options.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/options.cpp') diff --git a/src/options.cpp b/src/options.cpp index c0d5339..a713ede 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -45,19 +45,19 @@ int zmq::options_t::setsockopt (int option_, const void *optval_, switch (option_) { case ZMQ_HWM: - if (optvallen_ != sizeof (int64_t)) { + if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } - hwm = *((int64_t*) optval_); + hwm = *((uint64_t*) optval_); return 0; case ZMQ_LWM: - if (optvallen_ != sizeof (int64_t)) { + if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } - lwm = *((int64_t*) optval_); + lwm = *((uint64_t*) optval_); return 0; case ZMQ_SWAP: -- cgit v1.2.3