summaryrefslogtreecommitdiffstats
path: root/src/afb-autoset.c
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-02-18 15:04:38 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-04-02 09:58:49 +0200
commit16f014ef35b8355de1006891fe6920c8b51675fe (patch)
tree0a99e554556009cbd98e9b9715b67e60a6eb053a /src/afb-autoset.c
parentec0564bc90b3c63f7e82f09e81db8bd2cfac89a2 (diff)
Add conditionnal support of dynamic bindings
The load of dynamic bindings becomes removable. This is a step in direction of a tiny binder library. Also refactor AGL_DEVEL Signed-off-by: Jose Bollo <jose.bollo@iot.bzh> Change-Id: If283f431fd8a831429e717b2770464cb54476dc7
Diffstat (limited to 'src/afb-autoset.c')
-rw-r--r--src/afb-autoset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/afb-autoset.c b/src/afb-autoset.c
index cdfd2806..fcb353af 100644
--- a/src/afb-autoset.c
+++ b/src/afb-autoset.c
@@ -94,6 +94,7 @@ int afb_autoset_add_ws(const char *path, struct afb_apiset *declare_set, struct
/*******************************************************************/
+#if WITH_DYNAMIC_BINDING
static int create_so(const char *path, struct afb_apiset *declare_set, struct afb_apiset *call_set)
{
return afb_api_so_add_binding(path, declare_set, call_set) >= 0;
@@ -108,6 +109,7 @@ int afb_autoset_add_so(const char *path, struct afb_apiset *declare_set, struct
{
return add(path, declare_set, call_set, onlack_so);
}
+#endif
/*******************************************************************/
@@ -120,9 +122,11 @@ static int create_any(const char *path, struct afb_apiset *declare_set, struct a
rc = stat(path, &st);
if (!rc) {
switch(st.st_mode & S_IFMT) {
+#if WITH_DYNAMIC_BINDING
case S_IFREG:
rc = afb_api_so_add_binding(path, declare_set, call_set);
break;
+#endif
case S_IFSOCK:
snprintf(sockname, sizeof sockname, "unix:%s", path);
rc = afb_api_ws_add_client(sockname, declare_set, call_set, 0);