diff options
author | Pavel Březina <pbrezina@redhat.com> | 2014-12-10 19:24:58 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-23 21:29:17 +0100 |
commit | 9fa95168d80beba04b333b06edc492ecb8b085a1 (patch) | |
tree | 00071230415551a49b871f95a60f62ea392a8113 /src/tests | |
parent | d6ddc35574ba897cf9b5de3350086d9d8604f06f (diff) | |
download | sssd-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/tests')
-rw-r--r-- | src/tests/sbus_codegen_tests.c | 6 | ||||
-rw-r--r-- | src/tests/sbus_tests.c | 12 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/tests/sbus_codegen_tests.c b/src/tests/sbus_codegen_tests.c index d3d5d4680..dccb5e314 100644 --- a/src/tests/sbus_codegen_tests.c +++ b/src/tests/sbus_codegen_tests.c @@ -574,10 +574,8 @@ 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_iface.vtable, - "Crash into the billboard")); + ret = sbus_conn_register_iface(server, &pilot_iface.vtable, "/test/leela", + "Crash into the billboard"); ck_assert_int_eq(ret, EOK); return EOK; 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; |