From 19bee5c3674cda184443509b49b9415f599349ab Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 27 Aug 2015 16:22:33 +0200 Subject: sd-bus: rename bloom-tag to arg0-has We use dashes in our bloom-tags. Make sure the newly introduced arg0has tag uses the same style. Note that the external dbus-tags don't use dashes, though. They are defined in the spec and we need to keep compatibility there. --- src/libsystemd/sd-bus/bus-control.c | 4 ++-- src/libsystemd/sd-bus/bus-kernel.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index ad83446254..ef3e087b28 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -1309,9 +1309,9 @@ int bus_add_match_internal_kernel( } case BUS_MATCH_ARG_HAS...BUS_MATCH_ARG_HAS_LAST: { - char buf[sizeof("arg")-1 + 2 + sizeof("has")]; + char buf[sizeof("arg")-1 + 2 + sizeof("-has")]; - xsprintf(buf, "arg%ihas", c->type - BUS_MATCH_ARG_HAS); + xsprintf(buf, "arg%i-has", c->type - BUS_MATCH_ARG_HAS); bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str); using_bloom = true; break; diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index a217cf1a23..6750cbd77b 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -168,7 +168,7 @@ static void add_bloom_arg(void *data, size_t size, unsigned n_hash, unsigned i, } static void add_bloom_arg_has(void *data, size_t size, unsigned n_hash, unsigned i, const char *t) { - char buf[sizeof("arg")-1 + 2 + sizeof("has")]; + char buf[sizeof("arg")-1 + 2 + sizeof("-has")]; char *e; assert(data); @@ -184,7 +184,7 @@ static void add_bloom_arg_has(void *data, size_t size, unsigned n_hash, unsigned *(e++) = '0' + (char) (i % 10); } - strcpy(e, "has"); + strcpy(e, "-has"); bloom_add_pair(data, size, n_hash, buf, t); } -- cgit v1.2.3-54-g00ecf