summaryrefslogtreecommitdiffstats
path: root/src/providers/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/proxy')
-rw-r--r--src/providers/proxy/proxy_child.c8
-rw-r--r--src/providers/proxy/proxy_init.c11
2 files changed, 3 insertions, 16 deletions
diff --git a/src/providers/proxy/proxy_child.c b/src/providers/proxy/proxy_child.c
index e261b2f58..9876b9328 100644
--- a/src/providers/proxy/proxy_child.c
+++ b/src/providers/proxy/proxy_child.c
@@ -381,7 +381,6 @@ int proxy_child_send_id(struct sbus_connection *conn,
uint32_t id);
static int proxy_cli_init(struct pc_ctx *ctx)
{
- struct sbus_interface *intf;
char *sbus_address;
int ret;
@@ -399,12 +398,7 @@ static int proxy_cli_init(struct pc_ctx *ctx)
return ret;
}
- intf = sbus_new_interface(ctx, DP_PATH, &pc_methods.vtable, ctx);
- if (!intf) {
- ret = ENOMEM;
- } else {
- ret = sbus_conn_add_interface(ctx->conn, intf);
- }
+ ret = sbus_conn_register_iface(ctx->conn, &pc_methods.vtable, DP_PATH, ctx);
if (ret != EOK) {
DEBUG(SSSDBG_FATAL_FAILURE, "Failed to export proxy.\n");
return ret;
diff --git a/src/providers/proxy/proxy_init.c b/src/providers/proxy/proxy_init.c
index 1e7345117..f76ad02ae 100644
--- a/src/providers/proxy/proxy_init.c
+++ b/src/providers/proxy/proxy_init.c
@@ -331,7 +331,6 @@ static int proxy_client_init(struct sbus_connection *conn, void *data)
{
struct proxy_auth_ctx *proxy_auth_ctx;
struct proxy_client *proxy_cli;
- struct sbus_interface *intf;
struct timeval tv;
proxy_auth_ctx = talloc_get_type(data, struct proxy_auth_ctx);
@@ -362,14 +361,8 @@ static int proxy_client_init(struct sbus_connection *conn, void *data)
DEBUG(SSSDBG_CONF_SETTINGS,
"Set-up proxy client ID timeout [%p]\n", proxy_cli->timeout);
- /* Attach the client context to the connection context, so that it is
- * always available when we need to manage the connection. */
- intf = sbus_new_interface(conn, DP_PATH, &proxy_methods.vtable, proxy_cli);
- if (!intf) {
- return ENOMEM;
- }
-
- return sbus_conn_add_interface(conn, intf);
+ return sbus_conn_register_iface(conn, &proxy_methods.vtable,
+ DP_PATH, proxy_cli);
}
static void init_timeout(struct tevent_context *ev,