Load local IRK regardless of privacy setting 45/97545/1 accepted/tizen/common/20161115.200529 submit/tizen/20161115.034359
authorSeungyoun Ju <sy39.ju@samsung.com>
Thu, 3 Nov 2016 01:54:54 +0000 (10:54 +0900)
committerSudha Bheemanna <b.sudha@samsung.com>
Mon, 14 Nov 2016 11:56:54 +0000 (17:26 +0530)
[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 <b.sudha@samsung.com>
Change-Id: Ifa3299277f3df5f1f5631e281921812c15458f22

src/adapter.c

index 2eab56b..72cc90d 100644 (file)
@@ -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