afb-stub-ws: Improve naming 39/16239/1
authorJose Bollo <jose.bollo@iot.bzh>
Mon, 20 Aug 2018 13:15:39 +0000 (15:15 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 22 Aug 2018 12:03:52 +0000 (14:03 +0200)
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 <jose.bollo@iot.bzh>
src/afb-stub-ws.c
src/afb-stub-ws.h
src/afb-supervision.c
src/afs-supervisor.c

index 0a58b83..8475ae6 100644 (file)
@@ -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;
 }
index e14eac1..f236937 100644 (file)
@@ -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);
 
index 8636ef0..e6bc0a5 100644 (file)
@@ -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;
index f4ceb51..39f0a56 100644 (file)
@@ -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;
 }