X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hswitch.c;h=606d2664f853408c9fd5ec432db0dc950bc29fc4;hb=bd68881a7977d2fe63d4ca85b757ed9c127ec21d;hp=3fcd77de601d7d1db68ac8a2a4eedb5fcb8fcbc4;hpb=83ce3b29a598141f8f28afde655beb07ec78c312;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hswitch.c b/src/afb-hswitch.c index 3fcd77de..606d2664 100644 --- a/src/afb-hswitch.c +++ b/src/afb-hswitch.c @@ -74,19 +74,10 @@ int afb_hswitch_one_page_api_redirect(struct afb_hreq *hreq, void *data) int afb_hswitch_websocket_switch(struct afb_hreq *hreq, void *data) { - int later; - - afb_hreq_context(hreq); - if (hreq->lentail != 0 || !afb_websock_check(hreq, &later)) + if (hreq->lentail != 0) return 0; - if (!later) { - struct afb_websock *ws = afb_websock_create(hreq); - if (ws != NULL) - hreq->upgrade = 1; - } - return 1; + return afb_websock_check_upgrade(hreq /* TODO: protocols here */); } -