From: Andy Green Date: Mon, 18 Feb 2013 02:43:18 +0000 (+0800) Subject: fix no extensions build X-Git-Tag: accepted/2.0/20130307.220733~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4432096d997e47948f7b7a6ac88908ba4b03440;p=profile%2Fivi%2Flibwebsockets.git fix no extensions build Signed-off-by: Andy Green --- diff --git a/lib/client-handshake.c b/lib/client-handshake.c index d043545..f8fb6b5 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -166,8 +166,8 @@ libwebsocket_client_connect(struct libwebsocket_context *context, int ietf_version_or_minus_one) { struct libwebsocket *wsi; - int n; #ifndef LWS_NO_EXTENSIONS + int n; int m; struct libwebsocket_extension *ext; int handled; diff --git a/lib/client-parser.c b/lib/client-parser.c index 3b79f3e..4125efd 100644 --- a/lib/client-parser.c +++ b/lib/client-parser.c @@ -23,11 +23,11 @@ int libwebsocket_client_rx_sm(struct libwebsocket *wsi, unsigned char c) { - int n; int callback_action = LWS_CALLBACK_CLIENT_RECEIVE; int handled; struct lws_tokens eff_buf; #ifndef LWS_NO_EXTENSIONS + int n; int m; #endif @@ -274,11 +274,10 @@ spill: lwsl_parser("client sees server close len = %d\n", wsi->u.ws.rx_user_buffer_head); /* parrot the close packet payload back */ - n = libwebsocket_write(wsi, (unsigned char *) + libwebsocket_write(wsi, (unsigned char *) &wsi->u.ws.rx_user_buffer[ LWS_SEND_BUFFER_PRE_PADDING], wsi->u.ws.rx_user_buffer_head, LWS_WRITE_CLOSE); - lwsl_parser("client send close ack returned %d\n", n); wsi->state = WSI_STATE_RETURNED_CLOSE_ALREADY; /* close the connection */ return -1; @@ -286,7 +285,7 @@ spill: case LWS_WS_OPCODE_07__PING: lwsl_info("client received ping, doing pong\n"); /* parrot the ping packet payload back as a pong*/ - n = libwebsocket_write(wsi, (unsigned char *) + libwebsocket_write(wsi, (unsigned char *) &wsi->u.ws.rx_user_buffer[ LWS_SEND_BUFFER_PRE_PADDING], wsi->u.ws.rx_user_buffer_head, diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index bf31d0a..849ffb4 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -331,9 +331,7 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context, /* else, the send failed and we should just hang up */ } -#ifndef LWS_NO_EXTENSIONS just_kill_connection: -#endif lwsl_debug("close: just_kill_connection\n");