diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-15 21:08:13 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-10-08 15:53:53 +0200 |
commit | 8bbfce60e809f867c502f836c49ef70b9c4a0c63 (patch) | |
tree | 9565fc3ce5e43f73f0cca7d8d657e0fa5addefaf /4a-hal | |
parent | e03602c2b5dbd867adc39aed78258e51ca53a7b2 (diff) |
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 <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |