mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
Re-indent source files (replace each leading 8 spaces with tab)
This commit is contained in:
parent
38bca2992a
commit
bf3c91fbb6
10 changed files with 20 additions and 20 deletions
|
@ -204,7 +204,7 @@ struct libwebsocket *libwebsocket_client_connect_2(
|
|||
if (connect(wsi->sock, v, n) == -1 || LWS_ERRNO == LWS_EISCONN) {
|
||||
|
||||
if (LWS_ERRNO == LWS_EALREADY || LWS_ERRNO == LWS_EINPROGRESS
|
||||
|| LWS_ERRNO == LWS_EWOULDBLOCK) {
|
||||
|| LWS_ERRNO == LWS_EWOULDBLOCK) {
|
||||
lwsl_client("nonblocking connect retry\n");
|
||||
|
||||
/*
|
||||
|
|
|
@ -240,8 +240,8 @@ int libwebsocket_client_rx_sm(struct libwebsocket *wsi, unsigned char c)
|
|||
*/
|
||||
|
||||
if (!wsi->protocol->rx_buffer_size &&
|
||||
wsi->u.ws.rx_user_buffer_head !=
|
||||
LWS_MAX_SOCKET_IO_BUF)
|
||||
wsi->u.ws.rx_user_buffer_head !=
|
||||
LWS_MAX_SOCKET_IO_BUF)
|
||||
break;
|
||||
else
|
||||
if (wsi->protocol->rx_buffer_size &&
|
||||
|
|
|
@ -494,7 +494,7 @@ pre_data:
|
|||
if (wsi->u.http2.value) {
|
||||
if (lws_frag_start(wsi,
|
||||
lws_token_from_index(wsi,
|
||||
wsi->u.http2.header_index, NULL, NULL)))
|
||||
wsi->u.http2.header_index, NULL, NULL)))
|
||||
return 1;
|
||||
} else
|
||||
wsi->u.hdr.parser_state = WSI_TOKEN_NAME_PART;
|
||||
|
@ -521,7 +521,7 @@ pre_data:
|
|||
wsi->u.http2.hpack_pos =
|
||||
huftable_decode(
|
||||
wsi->u.http2.hpack_pos,
|
||||
(c >> 7) & 1);
|
||||
(c >> 7) & 1);
|
||||
c <<= 1;
|
||||
if (wsi->u.http2.hpack_pos == 0xffff)
|
||||
return 1;
|
||||
|
|
10
lib/http2.c
10
lib/http2.c
|
@ -430,8 +430,8 @@ int lws_http2_do_pps_send(struct libwebsocket_context *context, struct libwebsoc
|
|||
m += sizeof(wsi->u.http2.one_setting);
|
||||
}
|
||||
n = lws_http2_frame_write(wsi, LWS_HTTP2_FRAME_TYPE_SETTINGS,
|
||||
0, LWS_HTTP2_STREAM_ID_MASTER, m,
|
||||
&settings[LWS_SEND_BUFFER_PRE_PADDING]);
|
||||
0, LWS_HTTP2_STREAM_ID_MASTER, m,
|
||||
&settings[LWS_SEND_BUFFER_PRE_PADDING]);
|
||||
if (n != m) {
|
||||
lwsl_info("send %d %d\n", n, m);
|
||||
return 1;
|
||||
|
@ -482,9 +482,9 @@ int lws_http2_do_pps_send(struct libwebsocket_context *context, struct libwebsoc
|
|||
case LWS_PPS_HTTP2_PONG:
|
||||
memcpy(&settings[LWS_SEND_BUFFER_PRE_PADDING], wsi->u.http2.ping_payload, 8);
|
||||
n = lws_http2_frame_write(wsi, LWS_HTTP2_FRAME_TYPE_PING,
|
||||
LWS_HTTP2_FLAG_SETTINGS_ACK,
|
||||
LWS_HTTP2_STREAM_ID_MASTER, 8,
|
||||
&settings[LWS_SEND_BUFFER_PRE_PADDING]);
|
||||
LWS_HTTP2_FLAG_SETTINGS_ACK,
|
||||
LWS_HTTP2_STREAM_ID_MASTER, 8,
|
||||
&settings[LWS_SEND_BUFFER_PRE_PADDING]);
|
||||
if (n != 8) {
|
||||
lwsl_info("send %d %d\n", n, m);
|
||||
return 1;
|
||||
|
|
|
@ -1027,8 +1027,8 @@ struct libwebsocket_extension {
|
|||
* setting of the private key directly via openSSL library calls
|
||||
* @ssl_ca_filepath: CA certificate filepath or NULL
|
||||
* @ssl_cipher_list: List of valid ciphers to use (eg,
|
||||
* "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
|
||||
* or you can leave it as NULL to get "DEFAULT"
|
||||
* "RC4-MD5:RC4-SHA:AES128-SHA:AES256-SHA:HIGH:!DSS:!aNULL"
|
||||
* or you can leave it as NULL to get "DEFAULT"
|
||||
* @http_proxy_address: If non-NULL, attempts to proxy via the given address
|
||||
* @http_proxy_port: If http_proxy_address was non-NULL, uses this port at the address
|
||||
* @gid: group id to change to after setting listen socket, or -1.
|
||||
|
@ -1072,7 +1072,7 @@ struct lws_context_creation_info {
|
|||
#ifdef LWS_OPENSSL_SUPPORT
|
||||
SSL_CTX *provided_client_ssl_ctx;
|
||||
#else /* maintain structure layout either way */
|
||||
void *provided_client_ssl_ctx;
|
||||
void *provided_client_ssl_ctx;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -1188,7 +1188,7 @@ libwebsocket_set_timeout(struct libwebsocket *wsi,
|
|||
* memset(&buf[LWS_SEND_BUFFER_PRE_PADDING], 0, 128);
|
||||
*
|
||||
* libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING], 128,
|
||||
* LWS_WRITE_TEXT);
|
||||
* LWS_WRITE_TEXT);
|
||||
*
|
||||
* When sending LWS_WRITE_HTTP, there is no protocol addition and you can just
|
||||
* use the whole buffer without taking care of the above.
|
||||
|
|
|
@ -461,7 +461,7 @@ again:
|
|||
|
||||
fprintf(stdout, "/* total size %d bytes, biggest jump %d/256, fails=%d */\n};\n"
|
||||
"\n static unsigned char lextable_terms[] = {\n",
|
||||
pos, biggest, fails);
|
||||
pos, biggest, fails);
|
||||
|
||||
for (n = 0; n < (walk + 7) / 8; n++) {
|
||||
if (!(n & 7))
|
||||
|
|
|
@ -840,8 +840,8 @@ handle_first:
|
|||
*/
|
||||
|
||||
if (!wsi->protocol->rx_buffer_size &&
|
||||
wsi->u.ws.rx_user_buffer_head !=
|
||||
LWS_MAX_SOCKET_IO_BUF)
|
||||
wsi->u.ws.rx_user_buffer_head !=
|
||||
LWS_MAX_SOCKET_IO_BUF)
|
||||
break;
|
||||
else
|
||||
if (wsi->protocol->rx_buffer_size &&
|
||||
|
|
|
@ -223,7 +223,7 @@ int lws_http_action(struct libwebsocket_context *context,
|
|||
uri_ptr = lws_hdr_simple_ptr(wsi, methods[n]);
|
||||
uri_len = lws_hdr_total_length(wsi, methods[n]);
|
||||
lwsl_info("Method: %s request for '%s'\n",
|
||||
method_names[n], uri_ptr);
|
||||
method_names[n], uri_ptr);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ lws_handle_POLLOUT_event(struct libwebsocket_context *context,
|
|||
|
||||
m = lws_ext_callback_for_each_active(wsi,
|
||||
LWS_EXT_CALLBACK_PACKET_TX_PRESEND,
|
||||
&eff_buf, 0);
|
||||
&eff_buf, 0);
|
||||
if (m < 0) {
|
||||
lwsl_err("ext reports fatal error\n");
|
||||
return -1;
|
||||
|
|
|
@ -151,4 +151,4 @@ void lws_http2_configure_if_upgraded(struct libwebsocket *wsi)
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue