diff --git a/src/at.c b/src/at.c index a252923..b8bb3e8 100644 --- a/src/at.c +++ b/src/at.c @@ -241,12 +241,15 @@ static gboolean modem_response(gint fd, } while (ret > 0 && pos < (sizeof(response) - 1)); if (pos > 0) { + g_autofree gchar *escaped = NULL; + response[pos] = 0; g_strstrip(response); if (strlen(response) == 0) return TRUE; - g_message("Response: [%s]", response); + escaped = g_strescape(response, "\""); + g_message("Response: [%s]", escaped); /* * When the modem is started, it outputs 'RDY' to indicate that