aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-apiset.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-07-12 17:22:37 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-07-13 12:19:11 +0200
commitee022f72194200537dd32f0bdc9b741806dc4f43 (patch)
tree163dbf93359e0fd6971f9372ed2e036c301f78fa /src/afb-apiset.c
parent6f4abda7d5ccdb35d505fd9f6731c6b193f30f64 (diff)
afb-apiset: Try to initialize all APIs
Don't stop on the first error when initializing apis. Record the error and return it at the end. Change-Id: I1f0f50ff4e527ca5bf0e78904fccddafe54ba5f2 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-apiset.c')
-rw-r--r--src/afb-apiset.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/afb-apiset.c b/src/afb-apiset.c
index af5a8652..0eb64a5a 100644
--- a/src/afb-apiset.c
+++ b/src/afb-apiset.c
@@ -858,20 +858,21 @@ int afb_apiset_start_service(struct afb_apiset *set, const char *name, int share
*/
int afb_apiset_start_all_services(struct afb_apiset *set, int share_session)
{
- int rc;
+ int rc, ret;
int i;
+ ret = 0;
while (set) {
i = 0;
while (i < set->apis.count) {
rc = start_api(set->apis.apis[i], share_session, 1);
if (rc < 0)
- return rc;
+ ret = rc;
i++;
}
set = set->subset;
}
- return 0;
+ return ret;
}
/**