Loading system/btif/include/btif_config.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ int btif_config_get(const char* section, const char* key, const char* name, char int btif_config_set(const char* section, const char* key, const char* name, const char* value, int bytes, int type); int btif_config_remove(const char* section, const char* key, const char* name); int btif_config_filter_remove(const char* section, const char* filter[], int filter_count, int max_allowed); short btif_config_next_key(short current_key_pos, const char* section, char * key_name, int* key_name_bytes); short btif_config_next_value(short pos, const char* section, const char* key, char* value_name, int* value_name_bytes); Loading system/btif/src/btif_config.c +244 −103 File changed.Preview size limit exceeded, changes collapsed. Show changes system/btif/src/btif_storage.c +6 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,8 @@ #define BTIF_STORAGE_HL_APP_CB "hl_app_cb" #define BTIF_STORAGE_HL_APP_DATA "hl_app_data_" #define BTIF_STORAGE_HL_APP_MDL_DATA "hl_app_mdl_data_" #define BTIF_STORAGE_MAX_ALLOWED_REMOTE_DEVICE 512 /************************************************************************************ ** Local type definitions ************************************************************************************/ Loading Loading @@ -260,6 +262,10 @@ static int prop2cfg(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop) case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP: btif_config_set_int("Remote", bdstr, BTIF_STORAGE_PATH_REMOTE_DEVTIME, (int)time(NULL)); static const char* exclude_filter[] = {"LinkKey", "LE_KEY_PENC", "LE_KEY_PID", "LE_KEY_PCSRK", "LE_KEY_LENC", "LE_KEY_LCSRK"}; btif_config_filter_remove("Remote", exclude_filter, sizeof(exclude_filter)/sizeof(char*), BTIF_STORAGE_MAX_ALLOWED_REMOTE_DEVICE); break; case BT_PROPERTY_BDNAME: strncpy(value, (char*)prop->val, prop->len); Loading system/include/bt_trace.h +32 −1 Original line number Diff line number Diff line Loading @@ -4802,7 +4802,38 @@ extern UINT8 btif_trace_level; #define DRV_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) #define DRV_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) /* Simplified Trace Helper Macro */ #if (BT_USE_TRACES == TRUE) #define bdld(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_DEBUG, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdlw(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_WARNING, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdle(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_ERROR, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdla(assert_if) \ do{\ if(((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_ERROR) && !(assert_if)) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_ERROR, "%s(L%d): assert failed: " #assert_if, __FUNCTION__, __LINE__); \ }while(0) #else #define bdld(fmt, ...) ((void)0) /*Empty statement as placeholder*/ #define bdlw(fmt, ...) ((void)0) #define bdle(fmt, ...) ((void)0) #define bdla(assert_if) ((void)0) #endif #endif /* BT_TRACE_H */ Loading
system/btif/include/btif_config.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ int btif_config_get(const char* section, const char* key, const char* name, char int btif_config_set(const char* section, const char* key, const char* name, const char* value, int bytes, int type); int btif_config_remove(const char* section, const char* key, const char* name); int btif_config_filter_remove(const char* section, const char* filter[], int filter_count, int max_allowed); short btif_config_next_key(short current_key_pos, const char* section, char * key_name, int* key_name_bytes); short btif_config_next_value(short pos, const char* section, const char* key, char* value_name, int* value_name_bytes); Loading
system/btif/src/btif_config.c +244 −103 File changed.Preview size limit exceeded, changes collapsed. Show changes
system/btif/src/btif_storage.c +6 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,8 @@ #define BTIF_STORAGE_HL_APP_CB "hl_app_cb" #define BTIF_STORAGE_HL_APP_DATA "hl_app_data_" #define BTIF_STORAGE_HL_APP_MDL_DATA "hl_app_mdl_data_" #define BTIF_STORAGE_MAX_ALLOWED_REMOTE_DEVICE 512 /************************************************************************************ ** Local type definitions ************************************************************************************/ Loading Loading @@ -260,6 +262,10 @@ static int prop2cfg(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop) case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP: btif_config_set_int("Remote", bdstr, BTIF_STORAGE_PATH_REMOTE_DEVTIME, (int)time(NULL)); static const char* exclude_filter[] = {"LinkKey", "LE_KEY_PENC", "LE_KEY_PID", "LE_KEY_PCSRK", "LE_KEY_LENC", "LE_KEY_LCSRK"}; btif_config_filter_remove("Remote", exclude_filter, sizeof(exclude_filter)/sizeof(char*), BTIF_STORAGE_MAX_ALLOWED_REMOTE_DEVICE); break; case BT_PROPERTY_BDNAME: strncpy(value, (char*)prop->val, prop->len); Loading
system/include/bt_trace.h +32 −1 Original line number Diff line number Diff line Loading @@ -4802,7 +4802,38 @@ extern UINT8 btif_trace_level; #define DRV_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) APPL_TRACE_DEBUG5(m,p1,p2,p3,p4,p5) #define DRV_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) APPL_TRACE_DEBUG6(m,p1,p2,p3,p4,p5,p6) /* Simplified Trace Helper Macro */ #if (BT_USE_TRACES == TRUE) #define bdld(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_DEBUG, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdlw(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_WARNING, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdle(fmt, ...) \ do{\ if((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_DEBUG) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_ERROR, "%s(L%d): " fmt, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ }while(0) #define bdla(assert_if) \ do{\ if(((MY_LOG_LEVEL) >= BT_TRACE_LEVEL_ERROR) && !(assert_if)) \ LogMsg((MY_LOG_LAYER) | TRACE_TYPE_ERROR, "%s(L%d): assert failed: " #assert_if, __FUNCTION__, __LINE__); \ }while(0) #else #define bdld(fmt, ...) ((void)0) /*Empty statement as placeholder*/ #define bdlw(fmt, ...) ((void)0) #define bdle(fmt, ...) ((void)0) #define bdla(assert_if) ((void)0) #endif #endif /* BT_TRACE_H */