From f9ea1e2fd448dda7c987be796070cc89ff5a607b Mon Sep 17 00:00:00 2001 From: mbellomi Date: Tue, 21 May 2019 15:51:46 +0200 Subject: [PATCH] MINOR: WURFL: fixed Engine load failed error when wurfl-information-list contains wurfl_root_id --- src/wurfl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wurfl.c b/src/wurfl.c index 7167a929f8..d5c85add7f 100644 --- a/src/wurfl.c +++ b/src/wurfl.c @@ -102,9 +102,9 @@ static const struct { {"wurfl_isdevroot", ha_wurfl_get_wurfl_isdevroot}, {"wurfl_last_load_time", ha_wurfl_get_wurfl_last_load_time}, {"wurfl_normalized_useragent", ha_wurfl_get_wurfl_normalized_useragent}, + {"wurfl_root_id", ha_wurfl_get_wurfl_root_id}, {"wurfl_useragent", ha_wurfl_get_wurfl_useragent}, {"wurfl_useragent_priority", ha_wurfl_get_wurfl_useragent_priority }, // kept for backward conf file compat - {"wurfl_root_id", ha_wurfl_get_wurfl_root_id}, }; static const int HA_WURFL_PROPERTIES_NBR = 10; @@ -602,7 +602,10 @@ INITCALL1(STG_REGISTER, sample_register_convs, &conv_kws); // WURFL properties wrapper functions static const char *ha_wurfl_get_wurfl_root_id (wurfl_handle wHandle, wurfl_device_handle dHandle) { - return wurfl_device_get_root_id(dHandle); + if (wurfl_device_get_root_id(dHandle)) + return wurfl_device_get_root_id(dHandle); + else + return ""; } static const char *ha_wurfl_get_wurfl_id (wurfl_handle wHandle, wurfl_device_handle dHandle)