From 19894e0a1b6fbbcb62028fc6513ef3904a6f5c76 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 13 Apr 2012 09:34:13 +0200 Subject: 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 --- src/options.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/options.cpp') 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; -- cgit v1.2.3