From 4788fcd7becaef5a665dea0f9c0345401c80f757 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Bollo?= Date: Tue, 13 Feb 2018 12:18:49 +0100 Subject: [PATCH] afs-supervisor: Improve name of supervisor api MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Id0b43cecb91fa0a405c07f63d4f8c2f026c8a70c Signed-off-by: José Bollo --- src/afb-supervision.c | 2 +- src/afs-supervision.h | 2 +- src/afs-supervisor.c | 11 ++++++----- 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, -- 2.16.6