summaryrefslogtreecommitdiff
path: root/utils/loc_cfg.cpp
diff options
context:
space:
mode:
authorKevin Tang <zhikait@codeaurora.org>2014-09-16 22:43:56 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-10-20 15:00:39 -0700
commitd1cc6bfee73b7277ad93cfcda13006f80e98ab55 (patch)
treedd8cf67bdab3ffa7581ae22885b9c1019567a857 /utils/loc_cfg.cpp
parentaf2762ceca5cf9f99120ab5d1a6971fa1c3b5901 (diff)
downloadgps-d1cc6bfee73b7277ad93cfcda13006f80e98ab55.tar.gz
GPS LOCK did not work when NMEA_PROVIDER follows it
there is an implicit requirement on the loc_gps_cfg_s_type field data type, that is they must be 32 bit fields. Otherwise it would only work with the assistance of padding. When two adjacent 8 bit fields are defined, the later filled field would overwrite the previously written neighbor. This is why GPS_LOCK was tested as broken in the latest build. This also fixes a theoretic bug that when there are two of the same fields defined in the config table to be filled, the accounting of the filled entries was incorrect earlier. This is not a realistic bug, as there are no idential entries in the config table HAL fills. Bug: 16131208 CRs-fixed: 736966 Change-Id: I2e262fb30272f6f334508df17bb640022d7b1ef5
Diffstat (limited to 'utils/loc_cfg.cpp')
-rw-r--r--utils/loc_cfg.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp
index b4b3ded..404f3ed 100644
--- a/utils/loc_cfg.cpp
+++ b/utils/loc_cfg.cpp
@@ -175,8 +175,7 @@ DEPENDENCIES
N/A
RETURN VALUE
- 0: No config or incomplete config or invalid parameter
- 1: Filled a record
+ 0: Number of records in the config_table filled with input_buf
SIDE EFFECTS
N/A
@@ -220,7 +219,7 @@ int loc_fill_conf_item(char* input_buf,
for(uint32_t i = 0; NULL != config_table && i < table_length; i++)
{
if(!loc_set_config_entry(&config_table[i], &config_value)) {
- ret = 1;
+ ret += 1;
}
}
}