Modfy the restricted profile state value 09/87609/2
authorHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 9 Sep 2016 00:55:24 +0000 (09:55 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Fri, 9 Sep 2016 02:22:45 +0000 (11:22 +0900)
Change-Id: I8261cdd6a2174c43673fd26b3ebb0b2777f52f7b
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
src/device.c

index 108a511..981fbce 100644 (file)
@@ -371,8 +371,8 @@ typedef enum {
 #define PROFILE_SUPPORTED 0x3 /* This corresponds to binary 0b11*/
 
 typedef enum {
-       CONNECTION_RESTRICTED = 0x0, /* 0b00 */
-       CONNECTION_PERMITTED = 0x1, /* 0b01 */
+       CONNECTION_PERMITTED = 0x0, /* 0b00 */
+       CONNECTION_RESTRICTED = 0x1, /* 0b01 */
 } bt_profile_restricted_states;
 
 #define HFP_HS_SHIFT_OFFSET 0
@@ -3536,14 +3536,14 @@ static DBusMessage *set_restricted_profile(DBusConnection *conn,
                        dev->restricted_profiles.a2dp);
        if (g_strcmp0(uuid, HFP_HS_UUID) == 0) {
                if (profile_restricted)
-                       hfp_hs = CONNECTION_PERMITTED;
-               else
                        hfp_hs = CONNECTION_RESTRICTED;
+               else
+                       hfp_hs = CONNECTION_PERMITTED;
        } else if (g_strcmp0(uuid, A2DP_SINK_UUID) == 0) {
                if (profile_restricted)
-                       a2dp = CONNECTION_PERMITTED;
-               else
                        a2dp = CONNECTION_RESTRICTED;
+               else
+                       a2dp = CONNECTION_PERMITTED;
        } else {
                return btd_error_invalid_args(msg);
        }