summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-02-13 12:18:49 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-02-13 12:18:49 +0100
commit4788fcd7becaef5a665dea0f9c0345401c80f757 (patch)
tree9a93cd2482637ba7ad9e2a0b28a0745c5ec9082b
parent775144f839df8e3d37ec1cf52d0f7d3849ac7d46 (diff)
afs-supervisor: Improve name of supervisor api
Change-Id: Id0b43cecb91fa0a405c07f63d4f8c2f026c8a70c Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-supervision.c2
-rw-r--r--src/afs-supervision.h2
-rw-r--r--src/afs-supervisor.c11
3 files changed, 8 insertions, 7 deletions
diff --git a/src/afb-supervision.c b/src/afb-supervision.c
index 6812e00a..ecdcbf20 100644
--- a/src/afb-supervision.c
+++ b/src/afb-supervision.c
@@ -49,7 +49,7 @@
extern struct afb_config *main_config;
/* api and apiset name */
-static const char supervision_apiname[] = AFS_SURPERVISION_APINAME;
+static const char supervision_apiname[] = AFS_SURPERVISION_APINAME_INTERNAL;
/* path of the supervision socket */
static const char supervisor_socket_path[] = AFS_SURPERVISION_SOCKET;
diff --git a/src/afs-supervision.h b/src/afs-supervision.h
index d33b04d3..6fc2023b 100644
--- a/src/afs-supervision.h
+++ b/src/afs-supervision.h
@@ -45,4 +45,4 @@ struct afs_supervision_initiator
char extra[27]; /**< zero terminated extra computed here to be 64-37 */
};
-#define AFS_SURPERVISION_APINAME "$"
+#define AFS_SURPERVISION_APINAME_INTERNAL "$"
diff --git a/src/afs-supervisor.c b/src/afs-supervisor.c
index 32bd9956..8d76832a 100644
--- a/src/afs-supervisor.c
+++ b/src/afs-supervisor.c
@@ -63,7 +63,8 @@ struct supervised
};
/* api and apiset name */
-static const char supervision_apiname[] = AFS_SURPERVISION_APINAME;
+static const char supervision_apiname[] = AFS_SURPERVISION_APINAME_INTERNAL;
+static const char supervisor_apiname[] = "supervisor";
/* the main apiset */
struct afb_apiset *main_apiset;
@@ -269,14 +270,14 @@ static int init(const char *spec)
/* TODO check that value */
/* create the apisets */
- main_apiset = afb_apiset_create(supervision_apiname, 0);
+ main_apiset = afb_apiset_create(supervisor_apiname, 0);
if (!main_apiset) {
- ERROR("Can't create supervision's apiset");
+ ERROR("Can't create supervisor's apiset");
return -1;
}
empty_apiset = afb_apiset_create(supervision_apiname, 0);
if (!empty_apiset) {
- ERROR("Can't create supervised apiset");
+ ERROR("Can't create supervision apiset");
return -1;
}
@@ -525,7 +526,7 @@ static const struct afb_verb_v2 _afb_verbs_v2_supervision[] = {
};
static const struct afb_binding_v2 _afb_binding_v2_supervision = {
- .api = supervision_apiname,
+ .api = supervisor_apiname,
.specification = NULL,
.info = NULL,
.verbs = _afb_verbs_v2_supervision,