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
@@ -52,14 +52,13 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
if (version > 0 && version != s_version) {
|
||||
// Version mismatch: s_data has changed while client fetches it
|
||||
// Tell client to restart
|
||||
mg_http_reply(c, 200, headers, "{%m:%m, %m:%ld}", mg_print_esc, 0,
|
||||
"error", mg_print_esc, 0, "wrong version", mg_print_esc,
|
||||
0, "version", version);
|
||||
mg_http_reply(c, 200, headers, "{%m:%m, %m:%ld}", MG_ESC("error"),
|
||||
MG_ESC("wrong version"), MG_ESC("version"), version);
|
||||
} else {
|
||||
// Return data, up to CHUNK_SIZE elements
|
||||
mg_http_reply(c, 200, headers, "{%m:%ld,%m:%ld,%m:[%M]}", mg_print_esc,
|
||||
0, "version", s_version, mg_print_esc, 0, "start", start,
|
||||
mg_print_esc, 0, "data", printdata, start);
|
||||
mg_http_reply(c, 200, headers, "{%m:%ld,%m:%ld,%m:[%M]}",
|
||||
MG_ESC("version"), s_version, MG_ESC("start"), start,
|
||||
MG_ESC("data"), printdata, start);
|
||||
}
|
||||
} else {
|
||||
struct mg_http_serve_opts opts = {0};
|
||||
|
||||
Reference in new issue
Block a user