summaryrefslogtreecommitdiff
path: root/src/options.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-13 09:34:13 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-14 05:21:09 +0200
commit19894e0a1b6fbbcb62028fc6513ef3904a6f5c76 (patch)
tree365270e76f29acca4d60f66773c3ec375e413a85 /src/options.cpp
parent4f120cb103db3987e01ece48648c844218b91ff2 (diff)
Separate subscription forwarding from SUB-side filtering
- subscription forwarding is handled by XSUB socket - filtering is handled by SUB sockets - subscriptions are decoupled from filter engines - filter doesn't have to be able to enumarate the subscriptions (no sf_enumerate function) Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/options.cpp')
-rw-r--r--src/options.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/options.cpp b/src/options.cpp
index fdbffde..2a72add 100644
--- a/src/options.cpp
+++ b/src/options.cpp
@@ -49,10 +49,9 @@ xs::options_t::options_t () :
ipv4only (1),
keepalive (0),
protocol (0),
- filter_id (XS_FILTER_PREFIX),
+ filter (XS_FILTER_PREFIX),
delay_on_close (true),
delay_on_disconnect (true),
- filter (false),
send_identity (false),
recv_identity (false),
socket_id (0)
@@ -256,7 +255,7 @@ int xs::options_t::setsockopt (int option_, const void *optval_,
errno = EINVAL;
return -1;
}
- filter_id = *((int*) optval_);
+ filter = *((int*) optval_);
return 0;
}
@@ -454,7 +453,7 @@ int xs::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
errno = EINVAL;
return -1;
}
- *((int*) optval_) = filter_id;
+ *((int*) optval_) = filter;
*optvallen_ = sizeof (int);
return 0;