From 814f4fbea7cf99bfd6ef4ec460b3566b3058f82b Mon Sep 17 00:00:00 2001 From: Ward De Backer Date: Wed, 8 May 2024 11:30:33 +0200 Subject: [PATCH 1/2] fix: total # of requests per server --- src/mg_webstatus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mg_webstatus.c b/src/mg_webstatus.c index 4e81372..befa151 100644 --- a/src/mg_webstatus.c +++ b/src/mg_webstatus.c @@ -509,7 +509,7 @@ __try { while (pcon) { if (pcon->psrv == psrv) { no_connections ++; - no_requests += psrv->no_requests; + no_requests += pcon->no_requests; } pcon = pcon->pnext; } From c850fdb23718bc4206564b1d4be964253f07579d Mon Sep 17 00:00:00 2001 From: Ward De Backer Date: Wed, 8 May 2024 11:32:00 +0200 Subject: [PATCH 2/2] fix: report dbtype InterSystems Cache --- src/mg_webstatus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mg_webstatus.c b/src/mg_webstatus.c index befa151..9e1d40b 100644 --- a/src/mg_webstatus.c +++ b/src/mg_webstatus.c @@ -451,7 +451,7 @@ __try { sprintf(buffer, "%s {\r\n \"server\": \"%s\",\r\n", sn > 1 ? ",\r\n" : "", psrv->name); mg_status_add(pweb, padm, buffer, 0, 0); - sprintf(buffer, " \"type\": \"%s\",\r\n", psrv->dbtype == DBX_DBTYPE_IRIS ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_CACHE ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_YOTTADB ? "YottaDB" : "None"); + sprintf(buffer, " \"type\": \"%s\",\r\n", psrv->dbtype == DBX_DBTYPE_IRIS ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_CACHE ? "InterSystems Cache" : psrv->dbtype == DBX_DBTYPE_YOTTADB ? "YottaDB" : "None"); mg_status_add(pweb, padm, buffer, 0, 0); if (psrv->net_connection) { @@ -466,7 +466,7 @@ __try { sprintf(buffer, "Server: %s\r\n", psrv->name); mg_status_add(pweb, padm, buffer, 0, 0); - sprintf(buffer, " Type: %s\r\n", psrv->dbtype == DBX_DBTYPE_IRIS ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_CACHE ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_YOTTADB ? "YottaDB" : "None"); + sprintf(buffer, " Type: %s\r\n", psrv->dbtype == DBX_DBTYPE_IRIS ? "InterSystems IRIS" : psrv->dbtype == DBX_DBTYPE_CACHE ? "InterSystems Cache" : psrv->dbtype == DBX_DBTYPE_YOTTADB ? "YottaDB" : "None"); mg_status_add(pweb, padm, buffer, 0, 0); if (psrv->net_connection) {