diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2015-08-27 16:14:20 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2015-08-27 16:14:20 +0200 |
commit | 21e654dae99b3558ec7d7f6dfeb1c4c28b1ecf25 (patch) | |
tree | 12b0cd751676f8dc74972f218a264838c0d41314 /src/libsystemd/sd-bus/bus-control.c | |
parent | 5f92c3ada6b14aba47f6da3395b412b50bc4f59b (diff) | |
parent | eccd47c5beb72211ce33c9a33a1bb36366d43e22 (diff) |
Merge pull request #1036 from poettering/sd-bus-arg0has
sd-bus: introduce new match type "arg0has=" for matching arrays of st…
Diffstat (limited to 'src/libsystemd/sd-bus/bus-control.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 95c7d4ebe4..ad83446254 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -1308,7 +1308,16 @@ int bus_add_match_internal_kernel( break; } - case BUS_MATCH_ARG_PATH...BUS_MATCH_ARG_PATH_LAST: { + case BUS_MATCH_ARG_HAS...BUS_MATCH_ARG_HAS_LAST: { + char buf[sizeof("arg")-1 + 2 + sizeof("has")]; + + xsprintf(buf, "arg%ihas", 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; + } + + case BUS_MATCH_ARG_PATH...BUS_MATCH_ARG_PATH_LAST: /* * XXX: DBus spec defines arg[0..63]path= matching to be * a two-way glob. That is, if either string is a prefix @@ -1322,7 +1331,6 @@ int bus_add_match_internal_kernel( * to properly support multiple-matches here. */ break; - } case BUS_MATCH_ARG_NAMESPACE...BUS_MATCH_ARG_NAMESPACE_LAST: { char buf[sizeof("arg")-1 + 2 + sizeof("-dot-prefix")]; @@ -1333,7 +1341,7 @@ int bus_add_match_internal_kernel( break; } - case BUS_MATCH_DESTINATION: { + case BUS_MATCH_DESTINATION: /* * Kernel only supports matching on destination IDs, but * not on destination names. So just skip the @@ -1351,7 +1359,6 @@ int bus_add_match_internal_kernel( matches_name_change = false; break; - } case BUS_MATCH_ROOT: case BUS_MATCH_VALUE: |