aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-websock.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-03 10:03:58 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-04 11:55:38 +0200
commit5dd6480727cc1ecb12483fc4d971d73176505748 (patch)
tree495925fdba144f609daaad6da07281fd9bd94b69 /src/afb-websock.c
parentf262b0f726ac0577f40525038b779185f144873f (diff)
Switch to libsystemd events
This patch removes part of code that are not specific in favour of a more shared library. Change-Id: I3506e7514181cfbed753559bb65460f95b2141c9 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-websock.c')
-rw-r--r--src/afb-websock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/afb-websock.c b/src/afb-websock.c
index b4ad57a1..9f5619fb 100644
--- a/src/afb-websock.c
+++ b/src/afb-websock.c
@@ -204,8 +204,11 @@ int afb_websock_check_upgrade(struct afb_hreq *hreq)
ws = NULL;
rc = check_websocket_upgrade(hreq->connection, protodefs, afb_hreq_context(hreq), &ws);
- if (rc && ws != NULL)
- hreq->upgrade = 1;
+ if (rc == 1) {
+ hreq->replied = 1;
+ if (ws != NULL)
+ hreq->upgrade = 1;
+ }
return rc;
}