summaryrefslogtreecommitdiffstats
path: root/src/responder/ifp
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/responder/ifp
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/responder/ifp')
-rw-r--r--src/responder/ifp/ifpsrv.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/responder/ifp/ifpsrv.c b/src/responder/ifp/ifpsrv.c
index 0c333bc07..5b7f26ca1 100644
--- a/src/responder/ifp/ifpsrv.c
+++ b/src/responder/ifp/ifpsrv.c
@@ -178,7 +178,6 @@ sysbus_init(TALLOC_CTX *mem_ctx,
DBusError dbus_error;
DBusConnection *conn = NULL;
struct sysbus_ctx *system_bus = NULL;
- struct sbus_interface *sif;
int i;
errno_t ret;
@@ -226,17 +225,9 @@ sysbus_init(TALLOC_CTX *mem_ctx,
}
for (i = 0; sysbus_ifaces[i].path != NULL; i++) {
- sif = sbus_new_interface(system_bus->conn,
- sysbus_ifaces[i].path,
- sysbus_ifaces[i].iface_vtable,
- pvt);
- if (sif == NULL) {
- DEBUG(SSSDBG_CRIT_FAILURE,
- "Could not add the sbus interface\n");
- goto fail;
- }
-
- ret = sbus_conn_add_interface(system_bus->conn, sif);
+ ret = sbus_conn_register_iface(system_bus->conn,
+ sysbus_ifaces[i].iface_vtable,
+ sysbus_ifaces[i].path, pvt);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE,
"Could not add the interface\n");