From 83e678e20a5b692c7c7708672eaadb3fd495f4df Mon Sep 17 00:00:00 2001 From: Seungyoun Ju Date: Thu, 3 Nov 2016 10:54:54 +0900 Subject: [PATCH] Load local IRK regardless of privacy setting [Model] COMMON [BinType] AP [Customer] OPEN [Issue#] N/A [Request] Internal [Occurrence Version] N/A [Problem] IRK is changed every time it turns BT on [Cause & Measure] When privacy is disabled, it doesn't load IRK. But regardless of privacy setting we need to distribute IRK to remote device because of compatibility reason with Android devices [Checking Method] Turn BT off and on -> Check IRK [Team] Basic connection [Developer] Seungyoun Ju [Solution company] Samsung [Change Type] Specification change Signed-off-by: Sudha Bheemanna Change-Id: Ifa3299277f3df5f1f5631e281921812c15458f22 --- src/adapter.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 2eab56b..72cc90d 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -9354,25 +9354,20 @@ static void load_config(struct btd_adapter *adapter) } #ifdef __TIZEN_PATCH__ - /* Get Le Privacy feature support */ - adapter->le_privacy_enabled = main_opts.le_privacy; - if (adapter->le_privacy_enabled) { - /* Get Local IRK */ - str = g_key_file_get_string(key_file, - "General", "LocalIrk", &gerr); - if (gerr || !str || strlen(str) != 34) { - g_error_free(gerr); - gerr = NULL; + /* Get Local IRK */ + str = g_key_file_get_string(key_file, "General", "LocalIrk", &gerr); + if (gerr || !str || strlen(str) != 34) { + g_error_free(gerr); + gerr = NULL; + g_free(adapter->local_irk); + adapter->local_irk = NULL; + } else { + if (adapter->local_irk) g_free(adapter->local_irk); - adapter->local_irk = NULL; - } else { - if (adapter->local_irk) - g_free(adapter->local_irk); - adapter->local_irk = g_malloc0(MGMT_IRK_SIZE); - str2buf(&str[2], adapter->local_irk, MGMT_IRK_SIZE); - } + adapter->local_irk = g_malloc0(MGMT_IRK_SIZE); + str2buf(&str[2], adapter->local_irk, MGMT_IRK_SIZE); } #endif -- 2.7.4