From 8cd041bbb711426aaca745db679631f7386ed97e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 29 Aug 2011 11:46:58 -0400 Subject: [PATCH] ZeroMQ plugin: Publishers should connect, subscribers should bind. Change-Id: I783df8a3604fd903500588c5a9495d49f62240c8 --- src/collectd.conf.pod | 5 ++--- src/zeromq.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 6d37a1f0..848128d5 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -4816,13 +4816,12 @@ are: Publish values to a list of subscribers. Each value is send to all subscribers, unless their high water mark has been reached. The B options of this -socket should list I addresses that the publisher should I to. +socket should list I addresses that the publisher should I to. =item Subscribe Subscribe to values published by a publisher. The B options of this -socket should list I addresses that the subscriber should I -to. +socket should list I addresses that the subscriber should I to. =item Push diff --git a/src/zeromq.c b/src/zeromq.c index ea6399f5..ab642a69 100644 --- a/src/zeromq.c +++ b/src/zeromq.c @@ -338,7 +338,7 @@ static int cmq_config_socket (oconfig_item_t *ci) /* {{{ */ if (status != 0) continue; - if ((type == ZMQ_PUB) || (type == ZMQ_PULL)) + if ((type == ZMQ_SUB) || (type == ZMQ_PULL)) { DEBUG("Binding to %s", value); status = zmq_bind (cmq_socket, value); @@ -350,7 +350,7 @@ static int cmq_config_socket (oconfig_item_t *ci) /* {{{ */ continue; } } - else if ((type == ZMQ_SUB) || (type == ZMQ_PUSH)) + else if ((type == ZMQ_PUB) || (type == ZMQ_PUSH)) { DEBUG("Connecting to %s", value); status = zmq_connect (cmq_socket, value); -- 2.11.0