]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stats: make stats_dump_fields_html() not rely on proxy anymore
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Jan 2016 14:22:55 +0000 (15:22 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Mar 2016 16:08:05 +0000 (17:08 +0100)
Now this function doesn't need to use the proxy anymore, remove it from
its arguments.

src/dumpstats.c

index 64d60b0696c076ea69757a34d2cab1eea5a6c5da..f7e759743f9f586a9d1db10a62fd102864a97117 100644 (file)
@@ -3260,11 +3260,11 @@ static int stats_dump_fields_csv(struct chunk *out, const struct field *stats)
        return 1;
 }
 
-/* Dump all fields from <stats> for proxy <px> into trash using the HTML format.
+/* Dump all fields from <stats> into trash using the HTML format.
  * A column is reserved for the checkbox is <admin> is non-null. The caller's
  * flags may be passed in <flags> (eg: SHLGNDS to show the legends).
  */
-static int stats_dump_fields_html(const struct field *stats, int admin, unsigned int flags, struct proxy *px)
+static int stats_dump_fields_html(const struct field *stats, int admin, unsigned int flags)
 {
        struct chunk src;
 
@@ -3904,7 +3904,7 @@ static int stats_dump_one_line(const struct field *stats, unsigned int flags, st
        admin = (px->cap & PR_CAP_BE) && px->srv && (appctx->ctx.stats.flags & STAT_ADMIN);
 
        if (appctx->ctx.stats.flags & STAT_FMT_HTML)
-               return stats_dump_fields_html(stats, admin, flags, px);
+               return stats_dump_fields_html(stats, admin, flags);
        else
                return stats_dump_fields_csv(&trash, stats);
 }