diff options
author | Harikrishnan Hariharan <hahariha@codeaurora.org> | 2017-09-18 14:41:35 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-09-20 00:31:51 -0700 |
commit | 0ebaba253fa0a53bfe6c165073d5e17e66c99e8a (patch) | |
tree | 66cd46ccec7145d74976b05df2cdc47e47e8885d /core | |
parent | dda1d1299843a97d57bd1d708dea114de46d76fa (diff) | |
download | gps-0ebaba253fa0a53bfe6c165073d5e17e66c99e8a.tar.gz |
Set SUPL_HOST to modem on GnssAdapter init.
On init of GnssAdapter, SUPL_HOST and SUPL_PORT are set to
modem if the configs are set in gps.conf.
Change-Id: I079879adf31022cfbf0098da8dba3bb86feed069
CRs-Fixed: 2110547
Diffstat (limited to 'core')
-rw-r--r-- | core/ContextBase.cpp | 4 | ||||
-rw-r--r-- | core/ContextBase.h | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/core/ContextBase.cpp b/core/ContextBase.cpp index 8af48fc..05a0ad3 100644 --- a/core/ContextBase.cpp +++ b/core/ContextBase.cpp @@ -65,6 +65,8 @@ const loc_param_s_type ContextBase::mGps_conf_table[] = {"USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL", &mGps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL, NULL, 'n'}, {"AGPS_CONFIG_INJECT", &mGps_conf.AGPS_CONFIG_INJECT, NULL, 'n'}, {"EXTERNAL_DR_ENABLED", &mGps_conf.EXTERNAL_DR_ENABLED, NULL, 'n'}, + {"SUPL_HOST", &mGps_conf.SUPL_HOST, NULL, 's'}, + {"SUPL_PORT", &mGps_conf.SUPL_PORT, NULL, 'n'}, }; const loc_param_s_type ContextBase::mSap_conf_table[] = @@ -98,6 +100,8 @@ void ContextBase::readConfig() mGps_conf.SUPL_VER = 0x10000; mGps_conf.SUPL_MODE = 0x1; mGps_conf.SUPL_ES = 0; + mGps_conf.SUPL_HOST[0] = 0; + mGps_conf.SUPL_PORT = 0; mGps_conf.CAPABILITIES = 0x7; /* LTE Positioning Profile configuration is disable by default*/ mGps_conf.LPP_PROFILE = 0; diff --git a/core/ContextBase.h b/core/ContextBase.h index 83de999..dc64b6a 100644 --- a/core/ContextBase.h +++ b/core/ContextBase.h @@ -36,7 +36,8 @@ #include <LBSProxyBase.h> #include <loc_cfg.h> -#define MAX_XTRA_SERVER_URL_LENGTH 256 +#define MAX_XTRA_SERVER_URL_LENGTH (256) +#define MAX_SUPL_SERVER_URL_LENGTH (256) /* GPS.conf support */ /* NOTE: the implementaiton of the parser casts number @@ -64,6 +65,8 @@ typedef struct loc_gps_cfg_s uint32_t LPPE_CP_TECHNOLOGY; uint32_t LPPE_UP_TECHNOLOGY; uint32_t EXTERNAL_DR_ENABLED; + char SUPL_HOST[MAX_SUPL_SERVER_URL_LENGTH]; + uint32_t SUPL_PORT; } loc_gps_cfg_s_type; /* NOTE: the implementaiton of the parser casts number |