From 636ae998984211d367b9db2893a6f15e75a2a966 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Mon, 16 Jul 2018 23:36:01 +0100 Subject: [PATCH] cleanup --- src/mpd_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mpd_client.c b/src/mpd_client.c index b7dcb7b..157d91a 100644 --- a/src/mpd_client.c +++ b/src/mpd_client.c @@ -394,9 +394,8 @@ void callback_mympd(struct mg_connection *nc, const struct mg_str msg) mpd.conn_state = MPD_FAILURE; } - if (n == 0) { + if (n == 0) n = snprintf(mpd.buf, MAX_SIZE, "{\"type\": \"error\", \"data\": \"No response for cmd %s\"}", cmd); - } if (is_websocket(nc)) { #ifdef DEBUG