aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-06-22 18:18:31 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-06-22 18:18:31 +0200
commitb28c89df26160c56b9a99139c3153953868d36fc (patch)
treeaa05a6c91177dfd7eed4d9e82d105c05681f941a
parent176d14b5b4ec6338c9da5b7f55dce32f335245ae (diff)
afb-api-so: accept symbolic links for bindings
Change-Id: I1ef90b0f889767d04f84c8c7eb27d19c04390b15 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-api-so.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/afb-api-so.c b/src/afb-api-so.c
index 3167ffad..2b71d92f 100644
--- a/src/afb-api-so.c
+++ b/src/afb-api-so.c
@@ -82,14 +82,14 @@ static int load_binding(const char *path, int force, struct afb_apiset *declare_
goto error;
}
- /* try the version 2 */
+ /* try the version 3 */
rc = afb_api_so_v3_add(path, handle, declare_set, call_set);
if (rc < 0) {
/* error when loading a valid v3 binding */
goto error2;
}
if (rc)
- return 0; /* yes version 2 */
+ return 0; /* yes version 3 */
/* try the version 2 */
rc = afb_api_so_v2_add(path, handle, declare_set, call_set);
@@ -232,7 +232,7 @@ See https://sourceware.org/bugzilla/show_bug.cgi?id=22101
}
memcpy(&path[end], dent->d_name, len+1);
rc = adddirs(path, end+len, declare_set, call_set, failstops);
- } else if (dent->d_type == DT_REG) {
+ } else if (dent->d_type == DT_REG || dent->d_type == DT_LNK) {
/* case of files */
if (memcmp(&dent->d_name[len - 3], ".so", 4))
continue;