Permalink
Browse files

Small cleanups

  • Loading branch information...
hurtonm committed Nov 9, 2012
1 parent 925a530 commit ea19b7b65801669308b776c644acb056fa29a4e9
Showing with 6 additions and 13 deletions.
  1. +1 −1 src/options.cpp
  2. +0 −1 src/req.cpp
  3. +0 −2 src/session_base.cpp
  4. +5 −9 src/socket_base.cpp
View
@@ -49,13 +49,13 @@ zmq::options_t::options_t () :
delay_on_disconnect (true),
filter (false),
recv_identity (false),
+ raw_sock (false),
tcp_keepalive (-1),
tcp_keepalive_cnt (-1),
tcp_keepalive_idle (-1),
tcp_keepalive_intvl (-1),
socket_id (0)
{
- raw_sock = false;
}
int zmq::options_t::setsockopt (int option_, const void *optval_,
View
@@ -147,7 +147,6 @@ zmq::req_session_t::req_session_t (io_thread_t *io_thread_, bool connect_,
zmq::req_session_t::~req_session_t ()
{
- state = options.recv_identity ? identity : bottom;
}
int zmq::req_session_t::push_msg (msg_t *msg_)
View
@@ -20,8 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <stdarg.h>
-
#include "session_base.hpp"
#include "i_engine.hpp"
#include "err.hpp"
View
@@ -428,15 +428,11 @@ int zmq::socket_base_t::connect (const char *addr_)
// The total HWM for an inproc connection should be the sum of
// the binder's HWM and the connector's HWM.
- int sndhwm;
- int rcvhwm;
- if (options.sndhwm == 0 || peer.options.rcvhwm == 0)
- sndhwm = 0;
- else
+ int sndhwm = 0;
+ if (options.sndhwm != 0 && peer.options.rcvhwm != 0)
sndhwm = options.sndhwm + peer.options.rcvhwm;
- if (options.rcvhwm == 0 || peer.options.sndhwm == 0)
- rcvhwm = 0;
- else
+ int rcvhwm = 0;
+ if (options.rcvhwm != 0 && peer.options.sndhwm != 0)
rcvhwm = options.rcvhwm + peer.options.sndhwm;
// Create a bi-directional pipe to connect the peers.
@@ -1034,7 +1030,7 @@ int zmq::socket_base_t::monitor (const char *addr_, int events_)
// Register events to monitor
monitor_events = events_;
- monitor_socket = zmq_socket( get_ctx (), ZMQ_PAIR);
+ monitor_socket = zmq_socket (get_ctx (), ZMQ_PAIR);
if (monitor_socket == NULL)
return -1;

0 comments on commit ea19b7b

Please sign in to comment.