From eb001ef2aae5393fb3cbf6aa8c8270fd42028d7a Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 14 Jun 2024 00:34:50 +0100 Subject: [PATCH] Fix the view lastpos response. The locarray json data is transferred to the response object and if it is deleted here results in an empty object being returned to the user and the default view just shows "Imported data is malformed" instead of a map. This restores the vmap functionality. Signed-off-by: Pat Thoyts --- http.c | 1 - 1 file changed, 1 deletion(-) diff --git a/http.c b/http.c index 243bdf5..3fa0da0 100644 --- a/http.c +++ b/http.c @@ -1105,7 +1105,6 @@ static int view(struct mg_connection *conn, const char *viewname) json_append_member(obj, "data", locarray); json_delete(view); - json_delete(locarray); return (json_response(conn, obj)); /* NOTREACHED */