Commit c9fc7a13 authored by Sergey Lyubka's avatar Sergey Lyubka Committed by rojer

Fix JSON-RPC error formatting

PUBLISHED_FROM=9af7e0a2a90fab6e012174c154f62ee29c8b879c
parent 5f59b7e7
......@@ -8152,8 +8152,8 @@ int mg_rpc_create_error(char *buf, int len, struct mg_rpc_request *req,
n += json_emit(buf + n, len - n, "{s:s,s:V,s:{s:i,s:s,s:", "jsonrpc", "2.0",
"id", req->id == NULL ? "null" : req->id->ptr,
req->id == NULL ? 4 : req->id->len, "error", "code", code,
"message", message, "data");
req->id == NULL ? 4 : req->id->len, "error", "code",
(long) code, "message", message, "data");
va_start(ap, fmt);
n += json_emit_va(buf + n, len - n, fmt, ap);
va_end(ap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment