aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-wsj1.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-07-27 15:51:01 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-07-27 17:40:58 +0200
commit1ea6bd0f466a10d29f12801aa35fb6d2b30443a1 (patch)
tree308bbc689182de8cfd9e42f76dea57455d3a5434 /src/afb-wsj1.c
parent1d0f869ce3379089b4f4c5285e3d30e971e5b93d (diff)
Expose use of the event loop
The use of the event loop where previously hidden in internal deep places of the websocket modules. This commits enforce the client of the library to explicitely tell what event loop must be used. This has 3 effects: - you know that the systemd event loop is used - you tell the event loop to use (no confusion) - you don't depend on afb-common.c Change-Id: Id13d8a96f981183c299cde414d9bb0cd77fe3daa Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-wsj1.c')
-rw-r--r--src/afb-wsj1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-wsj1.c b/src/afb-wsj1.c
index 068a3326..253bb5ea 100644
--- a/src/afb-wsj1.c
+++ b/src/afb-wsj1.c
@@ -79,7 +79,7 @@ struct afb_wsj1
struct wsj1_call *calls;
};
-struct afb_wsj1 *afb_wsj1_create(int fd, struct afb_wsj1_itf *itf, void *closure)
+struct afb_wsj1 *afb_wsj1_create(struct sd_event *eloop, int fd, struct afb_wsj1_itf *itf, void *closure)
{
struct afb_wsj1 *result;
@@ -97,7 +97,7 @@ struct afb_wsj1 *afb_wsj1_create(int fd, struct afb_wsj1_itf *itf, void *closure
if (result->tokener == NULL)
goto error2;
- result->ws = afb_ws_create(fd, &wsj1_itf, result);
+ result->ws = afb_ws_create(eloop, fd, &wsj1_itf, result);
if (result->ws == NULL)
goto error3;