From acf2aeaec83e44e0310b3927e6dec2820b390c3c Mon Sep 17 00:00:00 2001 From: Mike Cailean Date: Wed, 19 Jun 2019 10:43:16 -0700 Subject: [PATCH] NV is not set to blank when SUPL_HOST is set to NONE Change-Id: Ib53e30dde614a9bee348a41083e177a5999dcfc1 CRs-fixed: 2473365 --- gnss/GnssAdapter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 7ef46e67..5d5a0d51 100644 --- a/gnss/GnssAdapter.cpp +++ b/gnss/GnssAdapter.cpp @@ -659,7 +659,7 @@ GnssAdapter::setSuplHostServer(const char* server, int port, LocServerType type) LOC_LOGe("Invalid type=%d", type); } else { string& url = (LOC_AGPS_SUPL_SERVER == type) ? getServerUrl() : getMoServerUrl(); - if (length > 0 && strncasecmp(url.c_str(), serverUrl, sizeof(serverUrl)) != 0) { + if (length >= 0 && strncasecmp(url.c_str(), serverUrl, sizeof(serverUrl)) != 0) { url.assign(serverUrl); if (LOC_AGPS_SUPL_SERVER == type) { @@ -837,7 +837,7 @@ std::vector GnssAdapter::gnssUpdateConfig(const std::string& oldS GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT) { if (gnssConfigNeedEngineUpdate.assistanceServer.type == GNSS_ASSISTANCE_TYPE_SUPL) { - if ((serverUrlLen != 0) && (oldServerUrl.compare(serverUrl) !=0)) { + if (0 != oldServerUrl.compare(serverUrl)) { err = mLocApi->setServerSync( serverUrl.c_str(), serverUrlLen, LOC_AGPS_SUPL_SERVER); @@ -845,7 +845,7 @@ std::vector GnssAdapter::gnssUpdateConfig(const std::string& oldS errsList[index] = err; } } - if ((moServerUrlLen != 0) && (oldMoServerUrl.compare(moServerUrl) != 0)) { + if (0 != oldMoServerUrl.compare(moServerUrl)) { LocationError locErr = mLocApi->setServerSync(moServerUrl.c_str(), moServerUrlLen,