1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

client check cb return during establish

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-18 00:50:14 +08:00
parent 6d64539fcb
commit da46eeea6b

View file

@ -718,9 +718,10 @@ check_accept:
* we seem to be good to go, give client last chance to check
* headers and OK it
*/
wsi->protocol->callback(wsi,
LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH,
wsi->user_space, NULL, 0);
if (wsi->protocol->callback(wsi,
LWS_CALLBACK_CLIENT_FILTER_PRE_ESTABLISH,
wsi->user_space, NULL, 0))
goto bail2;
/* clear his proxy connection timeout */
@ -762,8 +763,9 @@ check_accept:
/* call him back to inform him he is up */
wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_ESTABLISHED,
wsi->user_space, NULL, 0);
if (wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_ESTABLISHED,
wsi->user_space, NULL, 0))
goto bail3;
#ifndef LWS_NO_EXTENSIONS
/*
* inform all extensions, not just active ones since they