summaryrefslogtreecommitdiffstats
path: root/src/providers/proxy/proxy_init.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-12-10 19:24:58 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-01-23 21:29:17 +0100
commit9fa95168d80beba04b333b06edc492ecb8b085a1 (patch)
tree00071230415551a49b871f95a60f62ea392a8113 /src/providers/proxy/proxy_init.c
parentd6ddc35574ba897cf9b5de3350086d9d8604f06f (diff)
downloadsssd-9fa95168d80beba04b333b06edc492ecb8b085a1.tar.gz
sssd-9fa95168d80beba04b333b06edc492ecb8b085a1.tar.xz
sssd-9fa95168d80beba04b333b06edc492ecb8b085a1.zip
sbus: add new iface via sbus_conn_register_iface()
Rename sbus_conn_add_interface() to sbus_conn_register_iface() and remove sbus_new_interface() calls since it is just one more unnecessary call outside the sbus code. The function sbus_new_interface() is made static and used directly in sbus_conn_register_iface(). The name was chosen to better describe what the function is doing. That it registers an interface on a given object path. The same interface can be used with different paths so it is not really about adding an interface. Preparation for: https://fedorahosted.org/sssd/ticket/2339 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/proxy/proxy_init.c')
-rw-r--r--src/providers/proxy/proxy_init.c11
1 files changed, 2 insertions, 9 deletions
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,