From: David Carlier <[email protected]>

da_haproxy() took the property type from the atlas catalogue, but a result
may carry a different type for a property, e.g. a client-side property from
the cookie. The typed getter then failed and the value was printed empty.
The type is now read from the result with da_getproptype().

This should be backported to lower branches.
---
 addons/deviceatlas/da.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/deviceatlas/da.c b/addons/deviceatlas/da.c
index cb6f02db3..378e9451f 100644
--- a/addons/deviceatlas/da.c
+++ b/addons/deviceatlas/da.c
@@ -376,7 +376,7 @@ static int da_haproxy(const struct arg *args, struct sample 
*smp, da_deviceinfo_
                        chunk_appendf(tmp, "%c", global_deviceatlas.separator);
                        continue;
                }
-               if (unlikely(da_atlas_getproptype(&global_deviceatlas.atlas, 
prop, &proptype) != DA_OK)) {
+               if (unlikely(da_getproptype(devinfo, prop, &proptype) != 
DA_OK)) {
                        chunk_appendf(tmp, "%c", global_deviceatlas.separator);
                        continue;
                }
-- 
2.55.0



Reply via email to