Update to use MG_ESC()

This commit is contained in:
Sergio R. Caprile committed 2023-05-17 14:26:45 -03:00
1 parent f4cf40d38f
commit 1908d3200e
8 files changed
+46 -56

No files matched your search

+3 -3
View File
@@ -59,9 +59,9 @@ static void timer_fn(void *arg) {
// Broadcast message to all connected websocket clients.
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) {
if (c->data[0] != 'W') continue;
mg_ws_printf(c, WEBSOCKET_OP_TEXT, "{%m:%m,%m:[%d,%d,%d]}", mg_print_esc, 0,
"method", mg_print_esc, 0, "notification1", mg_print_esc, 0,
"params", 1, 2, 3);
mg_ws_printf(c, WEBSOCKET_OP_TEXT, "{%m:%m,%m:[%d,%d,%d]}",
MG_ESC("method"), MG_ESC("notification1"), MG_ESC("params"), 1,
2, 3);
}
}