Fix A2DP Sink device disconnect after pause and play 61/174861/3
authorAmit Purwar <amit.purwar@samsung.com>
Wed, 4 Apr 2018 12:07:48 +0000 (17:37 +0530)
committerAnupam Roy <anupam.r@samsung.com>
Thu, 5 Apr 2018 04:47:26 +0000 (04:47 +0000)
Change-Id: I35ced6cb1ef63f430c2120e3edc680e767929ea0
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
profiles/audio/a2dp.c

index 787989d..0619bb1 100644 (file)
@@ -914,12 +914,12 @@ static gboolean start_ind(struct avdtp *session, struct avdtp_local_sep *sep,
 
 #ifdef TIZEN_FEATURE_BLUEZ_MODIFY
        if (!a2dp_sep->locked) {
-               a2dp_sep->session = avdtp_ref(session);
-               if(a2dp_sep->remote_suspended == FALSE)
+               if (a2dp_sep->remote_suspended == FALSE) {
+                       a2dp_sep->session = avdtp_ref(session);
                        a2dp_sep->suspend_timer = g_timeout_add_seconds(SUSPEND_TIMEOUT,
                                                        (GSourceFunc) suspend_timeout,
                                                        a2dp_sep);
-               else
+               else
                        a2dp_sep->remote_suspended = FALSE;
        }
 #else