diff options
author | Tushar Janefalkar <tusharj@codeaurora.org> | 2013-01-24 17:41:46 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-03-19 15:57:50 -0700 |
commit | d2873a0bafad8099d16c69711b626b79c89354bb (patch) | |
tree | ba431e4f02d56ace22215360b2e0ada7d43c35ba /utils/loc_cfg.cpp | |
parent | cb30de1efcc47260654e3e1e6315f694b08c2ce7 (diff) | |
download | gps-d2873a0bafad8099d16c69711b626b79c89354bb.tar.gz |
Split gps configuration file (change 1/2)
gps.conf now split into
izat.conf: proprietary items
sap.conf : sensor assisted positioning items
gps.conf : items used in open source
(gps.conf moved to open source)
CRs-fixed: 461129
Change-Id: I819230ee3bb13aad0b91f7d33bfb9e57b6d1abe1
Diffstat (limited to 'utils/loc_cfg.cpp')
-rw-r--r-- | utils/loc_cfg.cpp | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/utils/loc_cfg.cpp b/utils/loc_cfg.cpp index 1dd4ef2..e4a4772 100644 --- a/utils/loc_cfg.cpp +++ b/utils/loc_cfg.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -56,36 +56,9 @@ static loc_param_s_type loc_parameter_table[] = {"DEBUG_LEVEL", &DEBUG_LEVEL, NULL, 'n'}, {"TIMESTAMP", &TIMESTAMP, NULL, 'n'}, }; - int loc_param_num = sizeof(loc_parameter_table) / sizeof(loc_param_s_type); /*=========================================================================== -FUNCTION loc_default_parameters - -DESCRIPTION - Resets the parameters to default - -DEPENDENCIES - N/A - -RETURN VALUE - None - -SIDE EFFECTS - N/A -===========================================================================*/ - -static void loc_default_parameters() -{ - /* defaults */ - DEBUG_LEVEL = 3; /* debug level */ - TIMESTAMP = 0; - - /* reset logging mechanism */ - loc_logger_init(DEBUG_LEVEL, TIMESTAMP); -} - -/*=========================================================================== FUNCTION trim_space DESCRIPTION @@ -246,15 +219,14 @@ void loc_read_conf(const char* conf_file_name, loc_param_s_type* config_table, u loc_param_v_type config_value; uint32_t i; - loc_default_parameters(); - if((gps_conf_fp = fopen(conf_file_name, "r")) != NULL) { - LOC_LOGD("%s: using %s", __FUNCTION__, GPS_CONF_FILE); + LOC_LOGD("%s: using %s", __FUNCTION__, conf_file_name); } else { - LOC_LOGW("%s: no %s file found", __FUNCTION__, GPS_CONF_FILE); + LOC_LOGW("%s: no %s file found", __FUNCTION__, conf_file_name); + loc_logger_init(DEBUG_LEVEL, TIMESTAMP); return; /* no parameter file */ } |