mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Update to use MG_ESC()
This commit is contained in:
1 parent
f4cf40d38f
commit
1908d3200e
8 files changed
+46
-56
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user