summaryrefslogtreecommitdiffstats
path: root/server/providers/dp_sbus.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-05 14:11:12 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-10 09:42:20 -0400
commit11c621b5ee1a0cdc27610f8b172017764acc285e (patch)
tree181c9079440367711c66d7281fc0aecb458fee77 /server/providers/dp_sbus.c
parentf1e4471551aa74015579bff0b64735cc9b085b74 (diff)
downloadsssd-11c621b5ee1a0cdc27610f8b172017764acc285e.tar.gz
sssd-11c621b5ee1a0cdc27610f8b172017764acc285e.tar.xz
sssd-11c621b5ee1a0cdc27610f8b172017764acc285e.zip
Simplify interfaces initialization
Make as much as possible static, and remove use of talloc_reference and allocation/deallocation of memory when not necessary. Fix also responder use of rctx->conn, was mistakenly used for both monitor and dp connections.
Diffstat (limited to 'server/providers/dp_sbus.c')
-rw-r--r--server/providers/dp_sbus.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/server/providers/dp_sbus.c b/server/providers/dp_sbus.c
index 22be6c843..f34822d5a 100644
--- a/server/providers/dp_sbus.c
+++ b/server/providers/dp_sbus.c
@@ -57,44 +57,3 @@ done:
return ret;
}
-int dp_init_sbus_methods(TALLOC_CTX *mem_ctx, struct sbus_method *methods,
- struct sbus_method_ctx **sm_ctx)
-{
- int ret;
- TALLOC_CTX *tmp_ctx;
- struct sbus_method_ctx *method_ctx;
-
- tmp_ctx = talloc_new(mem_ctx);
- if (tmp_ctx == NULL) {
- return ENOMEM;
- }
-
- method_ctx = talloc_zero(tmp_ctx, struct sbus_method_ctx);
- if (method_ctx == NULL) {
- ret = ENOMEM;
- goto done;
- }
-
- method_ctx->interface = talloc_strdup(method_ctx, DATA_PROVIDER_INTERFACE);
- if (method_ctx->interface == NULL) {
- ret = ENOMEM;
- goto done;
- }
-
- method_ctx->path = talloc_strdup(method_ctx, DATA_PROVIDER_PATH);
- if (method_ctx->path == NULL) {
- ret = ENOMEM;
- goto done;
- }
-
- method_ctx->methods = methods;
- method_ctx->message_handler = sbus_message_handler;
-
- *sm_ctx = method_ctx;
- talloc_steal(mem_ctx, method_ctx);
- ret = EOK;
-
-done:
- talloc_free(tmp_ctx);
- return ret;
-}