Small cleanups

This commit is contained in:
Martin Hurton 2012-11-09 14:12:11 +01:00
parent 925a530663
commit ea19b7b658
4 changed files with 6 additions and 13 deletions

View File

@ -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 File

@ -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 File

@ -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 File

@ -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;