From 58a21f8f9465a20cba3fdfc3abaee866dafc245f Mon Sep 17 00:00:00 2001 From: Jose Bollo Date: Mon, 20 Aug 2018 15:15:39 +0200 Subject: [PATCH] afb-stub-ws: Improve naming The function afb_stub_ws_on_hangup is now named afb_stub_ws_set_on_hangup. Bug-AGL: SPEC-1668 Change-Id: Ie96c77d4af10ee6b42aea6f57d7c3aadb95e6467 Signed-off-by: Jose Bollo --- src/afb-stub-ws.c | 2 +- src/afb-stub-ws.h | 2 +- src/afb-supervision.c | 2 +- src/afs-supervisor.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c index 0a58b836..8475ae61 100644 --- a/src/afb-stub-ws.c +++ b/src/afb-stub-ws.c @@ -670,7 +670,7 @@ void afb_stub_ws_addref(struct afb_stub_ws *stubws) __atomic_add_fetch(&stubws->refcount, 1, __ATOMIC_RELAXED); } -void afb_stub_ws_on_hangup(struct afb_stub_ws *stubws, void (*on_hangup)(struct afb_stub_ws*)) +void afb_stub_ws_set_on_hangup(struct afb_stub_ws *stubws, void (*on_hangup)(struct afb_stub_ws*)) { stubws->on_hangup = on_hangup; } diff --git a/src/afb-stub-ws.h b/src/afb-stub-ws.h index e14eac17..f236937d 100644 --- a/src/afb-stub-ws.h +++ b/src/afb-stub-ws.h @@ -31,7 +31,7 @@ extern void afb_stub_ws_unref(struct afb_stub_ws *stubws); extern void afb_stub_ws_addref(struct afb_stub_ws *stubws); -extern void afb_stub_ws_on_hangup(struct afb_stub_ws *stubws, void (*on_hangup)(struct afb_stub_ws*)); +extern void afb_stub_ws_set_on_hangup(struct afb_stub_ws *stubws, void (*on_hangup)(struct afb_stub_ws*)); extern const char *afb_stub_ws_name(struct afb_stub_ws *stubws); diff --git a/src/afb-supervision.c b/src/afb-supervision.c index 8636ef03..e6bc0a51 100644 --- a/src/afb-supervision.c +++ b/src/afb-supervision.c @@ -212,7 +212,7 @@ static void try_connect_supervisor() ERROR("Creation of supervisor failed: %m"); goto end; } - afb_stub_ws_on_hangup(supervisor, on_supervisor_hangup); + afb_stub_ws_set_on_hangup(supervisor, on_supervisor_hangup); /* successful termination */ goto end; diff --git a/src/afs-supervisor.c b/src/afs-supervisor.c index f4ceb510..39f0a568 100644 --- a/src/afs-supervisor.c +++ b/src/afs-supervisor.c @@ -225,7 +225,7 @@ static int make_supervised(int fd, struct afb_cred *cred) s->next = superviseds; superviseds = s; pthread_mutex_unlock(&mutex); - afb_stub_ws_on_hangup(s->stub, on_supervised_hangup); + afb_stub_ws_set_on_hangup(s->stub, on_supervised_hangup); return 0; } -- 2.16.6