From 5801a8247af17f05f7409d2aee8452cb66db0a85 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 25 Sep 2015 14:13:44 +0100 Subject: [PATCH] MINOR: global: Few new struct fields for da module The name and length of the client cookie, useful for extracting cookie value's function and a simple bitfield one to define if set or not. --- include/types/global.h | 3 +++ src/haproxy.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/types/global.h b/include/types/global.h index cb040744d..ea5c387d6 100644 --- a/include/types/global.h +++ b/include/types/global.h @@ -180,10 +180,13 @@ struct global { struct { void *atlasimgptr; char *jsonpath; + char *cookiename; + size_t cookienamelen; da_atlas_t atlas; da_evidence_id_t useragentid; da_severity_t loglevel; char separator; + unsigned char daset:1; } deviceatlas; #endif #ifdef USE_51DEGREES diff --git a/src/haproxy.c b/src/haproxy.c index 57db1db31..122693248 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -181,8 +181,11 @@ struct global global = { #ifdef USE_DEVICEATLAS .deviceatlas = { .loglevel = DA_SEV_INFO, - .useragentid = 0, .jsonpath = 0, + .cookiename = 0, + .cookienamelen = 0, + .useragentid = 0, + .daset = 0, .separator = '|', }, #endif