diff options
Diffstat (limited to 'main/bte_conf.c')
-rw-r--r-- | main/bte_conf.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/main/bte_conf.c b/main/bte_conf.c index a03e7be..662593a 100644 --- a/main/bte_conf.c +++ b/main/bte_conf.c @@ -68,10 +68,14 @@ /****************************************************************************** ** Externs ******************************************************************************/ +extern BOOLEAN hci_logging_enabled; +extern char hci_logfile[256]; extern BOOLEAN trace_conf_enabled; void bte_trace_conf(char *p_name, char *p_conf_value); int device_name_cfg(char *p_conf_name, char *p_conf_value); int device_class_cfg(char *p_conf_name, char *p_conf_value); +int logging_cfg_onoff(char *p_conf_name, char *p_conf_value); +int logging_set_filepath(char *p_conf_name, char *p_conf_value); int trace_cfg_onoff(char *p_conf_name, char *p_conf_value); BD_NAME local_device_default_name = BTM_DEF_LOCAL_NAME; @@ -131,6 +135,8 @@ typedef UINT8 tCONF_DID; static const conf_entry_t conf_table[] = { /*{"Name", device_name_cfg}, {"Class", device_class_cfg},*/ + {"BtSnoopLogOutput", logging_cfg_onoff}, + {"BtSnoopFileName", logging_set_filepath}, {"TraceConf", trace_cfg_onoff}, {(const char *) NULL, NULL} }; @@ -175,6 +181,21 @@ int device_class_cfg(char *p_conf_name, char *p_conf_value) return 0; } +int logging_cfg_onoff(char *p_conf_name, char *p_conf_value) +{ + if (strcmp(p_conf_value, "true") == 0) + hci_logging_enabled = TRUE; + else + hci_logging_enabled = FALSE; + return 0; +} + +int logging_set_filepath(char *p_conf_name, char *p_conf_value) +{ + strcpy(hci_logfile, p_conf_value); + return 0; +} + int trace_cfg_onoff(char *p_conf_name, char *p_conf_value) { trace_conf_enabled = (strcmp(p_conf_value, "true") == 0) ? TRUE : FALSE; |