]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: global: add several 51Degrees members to global
authorThomas Holmes <tom@51degrees.com>
Tue, 12 May 2015 14:47:24 +0000 (15:47 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 12:00:22 +0000 (14:00 +0200)
These are :
  fiftyoneDegreesDataSet _51d_data_set
  char *_51d_data_file_path
  char _51d_property_seperator
  struct list _51d_property_names

include/types/global.h

index 0764fc0e0585268d7eea6ae818a9dae56b31f77e..2203a1f389aadfde4e0e79af1b1d336fbc017026 100644 (file)
 #include <types/proxy.h>
 #include <types/task.h>
 
+#ifdef USE_51DEGREES
+#include <51Degrees.h>
+#endif
+
 #ifndef UNIX_MAX_PATH
 #define UNIX_MAX_PATH 108
 #endif
@@ -180,8 +184,22 @@ struct global {
                char separator;
        } deviceatlas;
 #endif
+
+#ifdef USE_51DEGREES
+       fiftyoneDegreesDataSet _51d_data_set;
+       char * _51d_data_file_path;       /* the path of the data file. this is taken from 51degrees-data-file in config. */
+       char _51d_property_seperator;    /* the seperator to use in the response for the values. this is taken from 51degrees-property-seperator from config. */
+       struct list _51d_property_names; /* list of properties to load into the data set. this is taken from 51degrees-property-name-list from config. */
+#endif
 };
 
+#ifdef USE_51DEGREES
+struct _51d_property_names {
+       struct list list;
+       char *name;
+};
+#endif
+
 extern struct global global;
 extern int  pid;                /* current process id */
 extern int  relative_pid;       /* process id starting at 1 */