chiark / gitweb /
bus: allow omitting quotes for values in match strings
[elogind.git] / src / libsystemd-bus / test-bus-match.c
index 7d7c55247f7844ef413d8aacf71956a2947630af..7227e2585d7a3704fd6a8b7c7cc7e88b3c442cb8 100644 (file)
@@ -31,7 +31,7 @@
 
 static bool mask[32];
 
-static int filter(sd_bus *b, sd_bus_message *m, void *userdata) {
+static int filter(sd_bus *b, sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
         log_info("Ran %i", PTR_TO_INT(userdata));
         mask[PTR_TO_INT(userdata)] = true;
         return 0;
@@ -107,13 +107,13 @@ int main(int argc, char *argv[]) {
         assert_se(match_add(&root, "path_namespace='/foo/quux'", 11) >= 0);
         assert_se(match_add(&root, "arg1='two'", 12) >= 0);
         assert_se(match_add(&root, "member='waldo',arg2path='/prefix/'", 13) >= 0);
-        assert_se(match_add(&root, "member='waldo',path='/foo/bar',arg3namespace='prefix'", 14) >= 0);
+        assert_se(match_add(&root, "member=waldo,path='/foo/bar',arg3namespace='prefix'", 14) >= 0);
 
         bus_match_dump(&root, 0);
 
         assert_se(sd_bus_message_new_signal(NULL, "/foo/bar", "bar.x", "waldo", &m) >= 0);
         assert_se(sd_bus_message_append(m, "ssss", "one", "two", "/prefix/three", "prefix.four") >= 0);
-        assert_se(bus_message_seal(m, 1) >= 0);
+        assert_se(bus_message_seal(m, 1, 0) >= 0);
 
         zero(mask);
         assert_se(bus_match_run(NULL, &root, m) == 0);