summaryrefslogtreecommitdiffstats
path: root/server/sbus/sbus_client.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/sbus/sbus_client.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/sbus/sbus_client.c')
-rw-r--r--server/sbus/sbus_client.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/server/sbus/sbus_client.c b/server/sbus/sbus_client.c
index 82021d6e2..df5c07120 100644
--- a/server/sbus/sbus_client.c
+++ b/server/sbus/sbus_client.c
@@ -26,7 +26,7 @@
int sbus_client_init(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
const char *server_address,
- struct sbus_method_ctx *sm_ctx,
+ struct sbus_interface *intf,
struct sbus_connection **_conn,
sbus_conn_destructor_fn destructor,
void *conn_pvt_data)
@@ -39,12 +39,7 @@ int sbus_client_init(TALLOC_CTX *mem_ctx,
return EINVAL;
}
- ret = sbus_new_connection(mem_ctx, ev, server_address, &conn);
- if (ret != EOK) {
- goto fail;
- }
-
- ret = sbus_conn_add_method_ctx(conn, sm_ctx);
+ ret = sbus_new_connection(mem_ctx, ev, server_address, intf, &conn);
if (ret != EOK) {
goto fail;
}