diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-07-13 16:38:55 +0200 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2018-07-16 17:09:23 +0200 |
commit | bebb8fa967f3b71b609119b293d2869d56036586 (patch) | |
tree | 213e124303fe9cec424283839d728d896da3cae0 /src/tests | |
parent | 2ab7061438040c68346124268ecf4081c835cbf2 (diff) |
Simplify starting of services
The previous version was confusing and was expecting
that onneed and share_session were always true.
Removing this parameter simplifies the code.
Also handle errors of required classes and apis at initialisation.
Change-Id: I7c99aa356cba41f368bd47cab797fa086a5740af
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/apiset/test-apiset.c | 8 | ||||
-rw-r--r-- | src/tests/apiv3/test-apiv3.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/apiset/test-apiset.c b/src/tests/apiset/test-apiset.c index bdc84137..ccab4637 100644 --- a/src/tests/apiset/test-apiset.c +++ b/src/tests/apiset/test-apiset.c @@ -384,7 +384,7 @@ int set_cb_getmask(void *closure) return set_last_api->mask; } -int set_cb_start(void *closure, int share_session, int onneed) +int set_cb_start(void *closure) { set_cb0(closure); ck_assert_int_eq(0, set_last_api->init); @@ -422,7 +422,7 @@ START_TEST (check_settings) nn = i; set_count = 0; - afb_apiset_start_all_services(a, 1); + afb_apiset_start_all_services(a); ck_assert_int_eq(nn, set_count); set_count = 0; @@ -480,7 +480,7 @@ struct clapi { int clorder; -int clacb_start(void *closure, int share_session, int onneed) +int clacb_start(void *closure) { struct clapi *a = closure; int i; @@ -541,7 +541,7 @@ START_TEST (check_classes) } /* start all */ - ck_assert_int_eq(0, afb_apiset_start_all_services(a, 0)); + ck_assert_int_eq(0, afb_apiset_start_all_services(a)); afb_apiset_unref(a); } diff --git a/src/tests/apiv3/test-apiv3.c b/src/tests/apiv3/test-apiv3.c index dec1af97..9a06bcbc 100644 --- a/src/tests/apiv3/test-apiv3.c +++ b/src/tests/apiv3/test-apiv3.c @@ -165,7 +165,7 @@ START_TEST (test) ck_assert_ptr_nonnull(out_api); /* start all services */ - rc = afb_apiset_start_all_services(apiset, 1); + rc = afb_apiset_start_all_services(apiset); ck_assert_int_eq(rc, 0); } END_TEST |