MINOR: stats: Move stuff about the stats status codes in stats files
The status codes definition (STAT_STATUS_*) and their string representation
stat_status_codes) have been moved in stats files. There is no reason to keep
them in proto_http files.
diff --git a/src/proto_http.c b/src/proto_http.c
index 0127e23..7bf0e20 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -75,18 +75,6 @@
#include <proto/pattern.h>
#include <proto/vars.h>
-/* status codes available for the stats admin page (strictly 4 chars length) */
-const char *stat_status_codes[STAT_STATUS_SIZE] = {
- [STAT_STATUS_DENY] = "DENY",
- [STAT_STATUS_DONE] = "DONE",
- [STAT_STATUS_ERRP] = "ERRP",
- [STAT_STATUS_EXCD] = "EXCD",
- [STAT_STATUS_NONE] = "NONE",
- [STAT_STATUS_PART] = "PART",
- [STAT_STATUS_UNKN] = "UNKN",
- [STAT_STATUS_IVAL] = "IVAL",
-};
-
/* This function handles a server error at the stream interface level. The
* stream interface is assumed to be already in a closed state. An optional
* message is copied into the input buffer.
diff --git a/src/stats.c b/src/stats.c
index 6f56353..7c20453 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -77,6 +77,18 @@
#endif
+/* status codes available for the stats admin page (strictly 4 chars length) */
+const char *stat_status_codes[STAT_STATUS_SIZE] = {
+ [STAT_STATUS_DENY] = "DENY",
+ [STAT_STATUS_DONE] = "DONE",
+ [STAT_STATUS_ERRP] = "ERRP",
+ [STAT_STATUS_EXCD] = "EXCD",
+ [STAT_STATUS_NONE] = "NONE",
+ [STAT_STATUS_PART] = "PART",
+ [STAT_STATUS_UNKN] = "UNKN",
+ [STAT_STATUS_IVAL] = "IVAL",
+};
+
/* These are the field names for each INF_* field position. Please pay attention
* to always use the exact same name except that the strings for new names must
* be lower case or CamelCase while the enum entries must be upper case.
@@ -294,8 +306,6 @@
*/
-extern const char *stat_status_codes[];
-
/* Dumps the stats CSV header to the trash buffer which. The caller is responsible
* for clearing it if needed.
* NOTE: Some tools happen to rely on the field position instead of its name,