From: mbellomi Date: Tue, 21 May 2019 13:51:46 +0000 (+0200) Subject: MINOR: WURFL: fixed Engine load failed error when wurfl-information-list contains... X-Git-Tag: v2.0-dev4~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9ea1e2fd448dda7c987be796070cc89ff5a607b;p=thirdparty%2Fhaproxy.git MINOR: WURFL: fixed Engine load failed error when wurfl-information-list contains wurfl_root_id --- 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)