diff options
author | Mike Cailean <mcailean@codeaurora.org> | 2019-06-19 10:43:16 -0700 |
---|---|---|
committer | Mike Cailean <mcailean@codeaurora.org> | 2019-06-19 10:43:16 -0700 |
commit | acf2aeaec83e44e0310b3927e6dec2820b390c3c (patch) | |
tree | 54bc8b402df318835ae65e23f039070a1742f038 /gnss | |
parent | 16c0367c5b3e17d76d9a68c8057d24c50252bf84 (diff) | |
download | gps-acf2aeaec83e44e0310b3927e6dec2820b390c3c.tar.gz |
NV is not set to blank when SUPL_HOST is set to NONE
Change-Id: Ib53e30dde614a9bee348a41083e177a5999dcfc1
CRs-fixed: 2473365
Diffstat (limited to 'gnss')
-rw-r--r-- | gnss/GnssAdapter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnss/GnssAdapter.cpp b/gnss/GnssAdapter.cpp index 7ef46e6..5d5a0d5 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<LocationError> 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<LocationError> 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, |