From 9fa95168d80beba04b333b06edc492ecb8b085a1 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Wed, 10 Dec 2014 19:24:58 +0100 Subject: 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 --- src/tests/sbus_tests.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/tests/sbus_tests.c') diff --git a/src/tests/sbus_tests.c b/src/tests/sbus_tests.c index 50c452e42..486e39221 100644 --- a/src/tests/sbus_tests.c +++ b/src/tests/sbus_tests.c @@ -178,17 +178,13 @@ static int pilot_test_server_init(struct sbus_connection *server, void *unused) { int ret; - ret = sbus_conn_add_interface(server, - sbus_new_interface(server, "/test/leela", - &pilot_impl.vtable, - "Crash into the billboard")); + ret = sbus_conn_register_iface(server, &pilot_impl.vtable, "/test/leela", + "Crash into the billboard"); ck_assert_int_eq(ret, EOK); - ret = sbus_conn_add_interface(server, - sbus_new_interface(server, "/test/fry", - &pilot_impl.vtable, - "Don't crash")); + ret = sbus_conn_register_iface(server, &pilot_impl.vtable, "/test/fry", + "Don't crash"); ck_assert_int_eq(ret, EOK); return EOK; -- cgit