]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: stats-service-openmetrics - Rename req to hsreq in stats_service_openmetrics_r...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 23 Nov 2019 11:19:14 +0000 (12:19 +0100)
committermartti.rannanjarvi <martti.rannanjarvi@open-xchange.com>
Sat, 18 Apr 2020 14:55:11 +0000 (14:55 +0000)
src/stats/stats-service-openmetrics.c

index 98dd683686a18ce057afee78fe34e6cb123d6052..b968c66fb73d2d0a12201ba16fc1eb4225949901 100644 (file)
@@ -328,28 +328,28 @@ static void openmetrics_export(struct http_server_response *resp)
 
 static void
 stats_service_openmetrics_request(void *context ATTR_UNUSED,
-                                 struct http_server_request *req,
+                                 struct http_server_request *hsreq,
                                  const char *sub_path)
 {
-       const struct http_request *hreq = http_server_request_get(req);
+       const struct http_request *hreq = http_server_request_get(hsreq);
        struct http_server_response *resp;
 
        if (strcmp(hreq->method, "OPTIONS") == 0) {
-               resp = http_server_response_create(req, 200, "OK");
+               resp = http_server_response_create(hsreq, 200, "OK");
                http_server_response_add_header(resp, "Allow", "GET");
                http_server_response_submit(resp);
                return;
        }
        if (strcmp(hreq->method, "GET") != 0) {
-               http_server_request_fail_bad_method(req, "GET");
+               http_server_request_fail_bad_method(hsreq, "GET");
                return;
        }
        if (*sub_path != '\0') {
-               http_server_request_fail(req, 404, "Not Found");
+               http_server_request_fail(hsreq, 404, "Not Found");
                return;
        }
 
-       resp = http_server_response_create(req, 200, "OK");
+       resp = http_server_response_create(hsreq, 200, "OK");
        http_server_response_add_header(
                resp, "Content-Type", "text/plain; "
                                      "version="OPENMETRICS_CONTENT_VERSION"; "