diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-12-12 15:14:09 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-23 21:29:34 +0100 |
commit | 71c9027d4192bf149afa4fcf9fef93bf6e901121 (patch) | |
tree | 823982d4ff67ccf906608742b7b73174db413851 /src/responder/ifp/ifp_components.c | |
parent | 46ee931314e6a5517f5c6b6b14f759364be119cc (diff) | |
download | sssd-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/responder/ifp/ifp_components.c')
-rw-r--r-- | src/responder/ifp/ifp_components.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/responder/ifp/ifp_components.c b/src/responder/ifp/ifp_components.c index c8ad7673c..2b76a480d 100644 --- a/src/responder/ifp/ifp_components.c +++ b/src/responder/ifp/ifp_components.c @@ -691,7 +691,6 @@ int ifp_component_change_debug_level_tmp(struct sbus_request *dbus_req, { struct ifp_ctx *ctx = NULL; DBusError *error = NULL; - const char *path = dbus_message_get_path(dbus_req->message); char *name = NULL; enum component_type type; errno_t ret; @@ -704,7 +703,7 @@ int ifp_component_change_debug_level_tmp(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(dbus_req, ctx->rctx->cdb, - path, &type, &name); + dbus_req->path, &type, &name); if (ret != EOK) { goto done; } @@ -736,7 +735,6 @@ void ifp_component_get_name(struct sbus_request *dbus_req, const char **_out) { struct ifp_ctx *ctx = NULL; - const char *path = dbus_message_get_path(dbus_req->message); char *name = NULL; errno_t ret; @@ -749,7 +747,7 @@ void ifp_component_get_name(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(dbus_req, ctx->rctx->cdb, - path, NULL, &name); + dbus_req->path, NULL, &name); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d]: %s\n", ret, strerror(ret)); @@ -764,7 +762,6 @@ void ifp_component_get_debug_level(struct sbus_request *dbus_req, uint32_t *_out) { struct ifp_ctx *ctx = NULL; - const char *path = dbus_message_get_path(dbus_req->message); const char *confdb_path = NULL; char *name = NULL; enum component_type type; @@ -780,7 +777,7 @@ void ifp_component_get_debug_level(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(dbus_req, ctx->rctx->cdb, - path, &type, &name); + dbus_req->path, &type, &name); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d]: %s\n", ret, strerror(ret)); @@ -820,7 +817,6 @@ void ifp_component_get_enabled(struct sbus_request *dbus_req, bool *_out) { struct ifp_ctx *ctx = NULL; - const char *path = dbus_message_get_path(dbus_req->message); const char *param = NULL; char **values = NULL; char *name = NULL; @@ -837,7 +833,7 @@ void ifp_component_get_enabled(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(dbus_req, ctx->rctx->cdb, - path, &type, &name); + dbus_req->path, &type, &name); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d]: %s\n", ret, strerror(ret)); @@ -877,7 +873,6 @@ void ifp_component_get_type(struct sbus_request *dbus_req, const char **_out) { struct ifp_ctx *ctx = NULL; - const char *path = dbus_message_get_path(dbus_req->message); enum component_type type; errno_t ret; @@ -890,7 +885,7 @@ void ifp_component_get_type(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(dbus_req, ctx->rctx->cdb, - path, &type, NULL); + dbus_req->path, &type, NULL); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d]: %s\n", ret, strerror(ret)); @@ -917,7 +912,6 @@ void ifp_backend_get_providers(struct sbus_request *dbus_req, { TALLOC_CTX *tmp_ctx = NULL; struct ifp_ctx *ctx = NULL; - const char *path = dbus_message_get_path(dbus_req->message); const char *confdb_path = NULL; char *name = NULL; enum component_type type; @@ -952,7 +946,7 @@ void ifp_backend_get_providers(struct sbus_request *dbus_req, } ret = check_and_get_component_from_path(tmp_ctx, ctx->rctx->cdb, - path, &type, &name); + dbus_req->path, &type, &name); if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, "Unknown object [%d]: %s\n", ret, strerror(ret)); |