From da4edc6c32bc456cb8a06316f20833f7885aba78 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 10 Feb 2013 16:25:20 +0800 Subject: [PATCH] throw out lws_websocket_related cruft Signed-off-by: Andy Green --- lib/client-handshake.c | 1 - lib/client-parser.c | 2 -- lib/output.c | 1 - lib/parsers.c | 2 -- lib/private-libwebsockets.h | 3 --- 5 files changed, 9 deletions(-) diff --git a/lib/client-handshake.c b/lib/client-handshake.c index 9292c03..26ef721 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -197,7 +197,6 @@ libwebsocket_client_connect(struct libwebsocket_context *context, wsi->u.hdr.name_buffer_pos = 0; wsi->user_space = NULL; wsi->state = WSI_STATE_CLIENT_UNCONNECTED; - wsi->u.ws.pings_vs_pongs = 0; wsi->protocol = NULL; wsi->pending_timeout = NO_PENDING_TIMEOUT; #ifndef LWS_NO_EXTENSIONS diff --git a/lib/client-parser.c b/lib/client-parser.c index ac72f8f..1d91788 100644 --- a/lib/client-parser.c +++ b/lib/client-parser.c @@ -279,8 +279,6 @@ spill: lwsl_info("client receied pong\n"); lwsl_hexdump(&wsi->u.ws.rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING], wsi->u.ws.rx_user_buffer_head); - /* keep the statistics... */ - wsi->u.ws.pings_vs_pongs--; /* issue it */ callback_action = LWS_CALLBACK_CLIENT_RECEIVE_PONG; diff --git a/lib/output.c b/lib/output.c index 3b19f40..8962f75 100644 --- a/lib/output.c +++ b/lib/output.c @@ -367,7 +367,6 @@ int libwebsocket_write(struct libwebsocket *wsi, unsigned char *buf, break; case LWS_WRITE_PING: n = LWS_WS_OPCODE_07__PING; - wsi->u.ws.pings_vs_pongs++; break; case LWS_WRITE_PONG: n = LWS_WS_OPCODE_07__PONG; diff --git a/lib/parsers.c b/lib/parsers.c index 91e0a3f..a320fef 100644 --- a/lib/parsers.c +++ b/lib/parsers.c @@ -858,8 +858,6 @@ spill: return 0; case LWS_WS_OPCODE_07__PONG: - /* keep the statistics... */ - wsi->u.ws.pings_vs_pongs--; /* ... then just drop it */ wsi->u.ws.rx_user_buffer_head = 0; return 0; diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index a9368bc..4c9c1c1 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -328,16 +328,13 @@ struct _lws_header_related { struct _lws_websocket_related { char *rx_user_buffer; int rx_user_buffer_head; - unsigned char masking_key_04[20]; unsigned char frame_masking_nonce_04[4]; - unsigned char frame_mask_04[20]; unsigned char frame_mask_index; size_t rx_packet_length; unsigned char opcode; unsigned int final:1; unsigned char rsv; unsigned int frame_is_binary:1; - int pings_vs_pongs; unsigned int all_zero_nonce:1; enum lws_close_status close_reason; unsigned char *rxflow_buffer; -- 2.7.4