mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-13 19:00:37 +00:00
Fix: improved debug output
This commit is contained in:
parent
b9a5c00956
commit
e1c9854dea
@ -515,13 +515,13 @@ void callback_mympd(struct mg_connection *nc, const struct mg_str msg) {
|
|||||||
|
|
||||||
if (is_websocket(nc)) {
|
if (is_websocket(nc)) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stdout, "Send websocket response:\n %s\n", mpd.buf);
|
fprintf(stderr, "Send websocket response:\n %s\n", mpd.buf);
|
||||||
#endif
|
#endif
|
||||||
mg_send_websocket_frame(nc, WEBSOCKET_OP_TEXT, mpd.buf, n);
|
mg_send_websocket_frame(nc, WEBSOCKET_OP_TEXT, mpd.buf, n);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
//fprintf(stdout, "Send http response:\n %s\n", mpd.buf);
|
fprintf(stderr, "Send http response (first 800 chars):\n%*.*s\n", 0, 800, mpd.buf);
|
||||||
#endif
|
#endif
|
||||||
mg_send_http_chunk(nc, mpd.buf, n);
|
mg_send_http_chunk(nc, mpd.buf, n);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user