summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Brooks <dave@bcs.co.nz>2012-04-20 12:13:37 +0800
committerAndy Green <andy.green@linaro.org>2012-04-20 12:13:37 +0800
commitee2213d365165ae4a5fc3362e1d05bff5d1ca70f (patch)
treeb9bd1c8fdd9148110b83d6cd35fd43062479348c
parent4d80662a65eead0d46e32399c01a6387be931e02 (diff)
reduce debug spew
Signed-off-by: David Brooks <dave@bcs.co.nz> Signed-off-by: Andy Green <andy@warmcat.com> --
-rw-r--r--lib/libwebsockets.c7
-rw-r--r--lib/parsers.c8
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c
index 9e22a16..13a18c6 100644
--- a/lib/libwebsockets.c
+++ b/lib/libwebsockets.c
@@ -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++;
diff --git a/lib/parsers.c b/lib/parsers.c
index 61f3045..a185971 100644
--- a/lib/parsers.c
+++ b/lib/parsers.c
@@ -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;