summaryrefslogtreecommitdiffstats
path: root/src/afb-websock.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-03-31 16:11:07 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-03-31 16:14:02 +0200
commit6797f9722dd3e5463e0f7c118397955bb59a40c7 (patch)
tree05f6aaf980d4080f871fc368509ff0156eaaec3b /src/afb-websock.c
parent20ea5089d0e5526afaa5231f30add7b25b2499bd (diff)
Factorize common code for handling requests
The common code for session handling is shared using struct afb_xreq. At the moment only hreq leverages the new feature. The objective is double: make the work of writing new internal requests more easy and prepare to check permissions. Change-Id: If3ca311d68c2d8c427d1125f31a2704b150c2c94 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-websock.c')
-rw-r--r--src/afb-websock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-websock.c b/src/afb-websock.c
index 8fbf22c2..abdcfa1d 100644
--- a/src/afb-websock.c
+++ b/src/afb-websock.c
@@ -212,7 +212,7 @@ int afb_websock_check_upgrade(struct afb_hreq *hreq)
return 0;
ws = NULL;
- rc = check_websocket_upgrade(hreq->connection, protodefs, &hreq->context, &ws);
+ rc = check_websocket_upgrade(hreq->connection, protodefs, &hreq->xreq.context, &ws);
if (rc == 1) {
hreq->replied = 1;
if (ws != NULL)