summaryrefslogtreecommitdiffstats
path: root/src/tests/sbus_tests.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-12-12 15:14:09 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-23 21:29:34 +0100
commit71c9027d4192bf149afa4fcf9fef93bf6e901121 (patch)
tree823982d4ff67ccf906608742b7b73174db413851 /src/tests/sbus_tests.c
parent46ee931314e6a5517f5c6b6b14f759364be119cc (diff)
downloadsssd-71c9027d4192bf149afa4fcf9fef93bf6e901121.tar.gz
sssd-71c9027d4192bf149afa4fcf9fef93bf6e901121.tar.xz
sssd-71c9027d4192bf149afa4fcf9fef93bf6e901121.zip
sbus: add object path to sbus request
Object path is heavily used in implementation of methods from interfaces that are supported on whole subtrees. Although it can be obtained from a D-Bus message, it is nice to have it accessible directly. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/tests/sbus_tests.c')
-rw-r--r--src/tests/sbus_tests.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tests/sbus_tests.c b/src/tests/sbus_tests.c
index 6086a42bf..288163d61 100644
--- a/src/tests/sbus_tests.c
+++ b/src/tests/sbus_tests.c
@@ -108,7 +108,6 @@ const struct sbus_interface_meta pilot_meta = {
static int blink_handler(struct sbus_request *req, void *data)
{
DBusError error = DBUS_ERROR_INIT;
- const char *path;
dbus_int32_t duration = 0;
dbus_bool_t crashed;
@@ -116,12 +115,11 @@ static int blink_handler(struct sbus_request *req, void *data)
ck_assert(data != NULL);
ck_assert(data == req->intf->instance_data);
- path = dbus_message_get_path(req->message);
- ck_assert_str_eq(req->intf->path, path);
+ ck_assert_str_eq(req->intf->path, req->path);
- if (strcmp(path, "/test/fry") == 0) {
+ if (strcmp(req->path, "/test/fry") == 0) {
ck_assert_str_eq(data, "Don't crash");
- } else if (strcmp(path, "/test/leela") == 0) {
+ } else if (strcmp(req->path, "/test/leela") == 0) {
ck_assert_str_eq(data, "Crash into the billboard");
} else {
ck_abort();