]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] export the hostname variable so that all the code can access it
authorWilly Tarreau <w@1wt.eu>
Sun, 16 Aug 2009 08:08:02 +0000 (10:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 16 Aug 2009 08:08:02 +0000 (10:08 +0200)
The hostname variable will be used later, export it.

include/common/defaults.h
include/types/global.h
src/haproxy.c

index a2267b19d0d2c44ae2d8f044be74bafa7ed0e236..f0873cfae48e13de5888baadff41388500822f3d 100644 (file)
 #define MAX_SIGNAL 256
 #endif
 
+/* Maximum host name length */
+#ifndef MAX_HOSTNAME_LEN
+#define MAX_HOSTNAME_LEN       32
+#endif
+
 #endif /* _COMMON_DEFAULTS_H */
index 1ba0b11804bb5750d56bd470043b002ab26f76e5..542abfe3566fe9e77e7bfe2dbab5cef17ad15163 100644 (file)
@@ -95,6 +95,7 @@ extern const int zero;
 extern const int one;
 extern const struct linger nolinger;
 extern int stopping;   /* non zero means stopping in progress */
+extern char hostname[MAX_HOSTNAME_LEN];
 
 #endif /* _TYPES_GLOBAL_H */
 
index 2a4ed6a7665f743f5b99fc8debcc9986b44a2527..607ff155f4321aafe02c52ceb6bdde4767e352d4 100644 (file)
@@ -152,12 +152,7 @@ const int zero = 0;
 const int one = 1;
 const struct linger nolinger = { .l_onoff = 1, .l_linger = 0 };
 
-/*
- * Syslog facilities and levels. Conforming to RFC3164.
- */
-
-#define MAX_HOSTNAME_LEN       32
-static char hostname[MAX_HOSTNAME_LEN] = "";
+char hostname[MAX_HOSTNAME_LEN] = "";
 
 
 /*********************************************************************/