mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
reduce debug spew
Signed-off-by: David Brooks <dave@bcs.co.nz> Signed-off-by: Andy Green <andy@warmcat.com> --
This commit is contained in:
parent
4d80662a65
commit
ee2213d365
2 changed files with 6 additions and 9 deletions
|
@ -1392,7 +1392,7 @@ accept_ok:
|
|||
wsi->state = WSI_STATE_ESTABLISHED;
|
||||
wsi->mode = LWS_CONNMODE_WS_CLIENT;
|
||||
|
||||
fprintf(stderr, "handshake OK for protocol %s\n", wsi->protocol->name);
|
||||
debug("handshake OK for protocol %s\n", wsi->protocol->name);
|
||||
|
||||
/* call him back to inform him he is up */
|
||||
|
||||
|
@ -2847,8 +2847,7 @@ libwebsocket_create_context(int port, const char *interf,
|
|||
protocols[context->count_protocols].callback;
|
||||
context->count_protocols++) {
|
||||
|
||||
fprintf(stderr, " Protocol: %s\n",
|
||||
protocols[context->count_protocols].name);
|
||||
debug(" Protocol: %s\n", protocols[context->count_protocols].name);
|
||||
|
||||
protocols[context->count_protocols].owning_server = context;
|
||||
protocols[context->count_protocols].protocol_index =
|
||||
|
@ -2924,7 +2923,7 @@ libwebsocket_create_context(int port, const char *interf,
|
|||
if (port)
|
||||
m = LWS_EXT_CALLBACK_SERVER_CONTEXT_CONSTRUCT;
|
||||
while (extensions->callback) {
|
||||
fprintf(stderr, " Extension: %s\n", extensions->name);
|
||||
debug(" Extension: %s\n", extensions->name);
|
||||
extensions->callback(context, extensions,
|
||||
NULL, m, NULL, NULL, 0);
|
||||
extensions++;
|
||||
|
|
|
@ -737,7 +737,7 @@ spill:
|
|||
* fine he has told us he is closing too, let's
|
||||
* finish our close
|
||||
*/
|
||||
fprintf(stderr, "seen client close ack\n");
|
||||
debug("seen client close ack\n");
|
||||
return -1;
|
||||
}
|
||||
debug("server sees client close packet\n");
|
||||
|
@ -1206,14 +1206,12 @@ spill:
|
|||
debug("seen server's close ack\n");
|
||||
return -1;
|
||||
}
|
||||
fprintf(stderr, "client sees server close packet "
|
||||
"len = %d\n", wsi->rx_user_buffer_head);
|
||||
debug("client sees server close packet len = %d\n", wsi->rx_user_buffer_head);
|
||||
/* parrot the close packet payload back */
|
||||
n = libwebsocket_write(wsi, (unsigned char *)
|
||||
&wsi->rx_user_buffer[LWS_SEND_BUFFER_PRE_PADDING],
|
||||
wsi->rx_user_buffer_head, LWS_WRITE_CLOSE);
|
||||
fprintf(stderr, "client writing close "
|
||||
"ack returned %d\n", n);
|
||||
debug("client writing close ack returned %d\n", n);
|
||||
wsi->state = WSI_STATE_RETURNED_CLOSE_ALREADY;
|
||||
/* close the connection */
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue