summaryrefslogtreecommitdiffstats
path: root/src/providers/data_provider_be.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/data_provider_be.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/data_provider_be.c')
-rw-r--r--src/providers/data_provider_be.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 95df2d9c6..53a0be258 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -2216,7 +2216,6 @@ static void init_timeout(struct tevent_context *ev,
static int be_client_init(struct sbus_connection *conn, void *data)
{
- struct sbus_interface *intf;
struct be_ctx *bectx;
struct be_client *becli;
struct timeval tv;
@@ -2252,14 +2251,7 @@ static int be_client_init(struct sbus_connection *conn, void *data)
DEBUG(SSSDBG_CONF_SETTINGS,
"Set-up Backend ID timeout [%p]\n", becli->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, &be_methods.vtable, becli);
- if (!intf) {
- return ENOMEM;
- }
-
- return sbus_conn_add_interface(conn, intf);
+ return sbus_conn_register_iface(conn, &be_methods.vtable, DP_PATH, becli);
}
/* be_srv_init