Fix profile check logic to distinguish ivi and iot 99/191899/2
authorWootak Jung <wootak.jung@samsung.com>
Thu, 25 Oct 2018 06:10:58 +0000 (15:10 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 25 Oct 2018 06:29:47 +0000 (15:29 +0900)
Change-Id: Iaa8e0786787bfba81987d6fdb29d2a95dd867ab9

include/bt-internal-types.h

index 7f01e28..7fe236e 100644 (file)
@@ -691,7 +691,8 @@ typedef enum {
        _PROFILE_WEARABLE = 0x2,
        _PROFILE_TV = 0x4,
        _PROFILE_IVI = 0x8,
-       _PROFILE_COMMON = 0x10,
+       _PROFILE_IOT = 0x10,
+       _PROFILE_COMMON = 0x20,
 } tizen_profile_t;
 
 /* For optimization, make this extern and define in a shared C file */
@@ -732,7 +733,12 @@ static inline tizen_profile_t get_tizen_profile()
                break;
        case 'i':
        case 'I':
-               profile = _PROFILE_IVI;
+               if (!strncasecmp(profileName, "ivi", 3))
+                       profile = _PROFILE_IVI;
+               else if (!strncasecmp(profileName, "iot", 3))
+                       profile = _PROFILE_IOT;
+               else
+                       profile = _PROFILE_COMMON;
                break;
        default: // common or unknown ==> ALL ARE COMMON.
                profile = _PROFILE_COMMON;