From 8bbfce60e809f867c502f836c49ef70b9c4a0c63 Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Fri, 15 Jun 2018 21:08:13 +0200 Subject: Authorize launching 4a-hal with no config file Now, even if no json audio configuration files are found at binding launch, it won't fails to initialize and will be reachable nethertheless. Change-Id: If7dd0798ef4b262eda98c5dbcc7dd6d9b1b108b5 Signed-off-by: Jonathan Aillet --- 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '4a-hal') diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c index b7f2a78..ba3b74d 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c @@ -221,8 +221,8 @@ int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData) configJ = CtlConfigScan(dirList, "hal"); if(! configJ) { - AFB_ApiError(apiHandle, "%s: No hal-(binder-middle-name)*.json config file(s) found in %s ", __func__, dirList); - return -2; + AFB_ApiWarning(apiHandle, "%s: No hal-(binder-middle-name)*.json config file(s) found in %s, 4a-hal-manager will only works with external hal", __func__, dirList); + return 0; } // We load 1st file others are just warnings @@ -231,7 +231,7 @@ int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData) if(wrap_json_unpack(entryJ, "{s:s, s:s !}", "fullpath", &fullPath, "filename", &fileName)) { AFB_ApiError(apiHandle, "%s: HOOPs invalid JSON entry = %s", __func__, json_object_get_string(entryJ)); - return -1; + return -2; } strncpy(filePath, fullPath, sizeof(filePath) - 1); -- cgit 1.2.3-korg