From: Ayush Garg Date: Mon, 27 Dec 2021 10:28:08 +0000 (+0530) Subject: Add avdtp ref when disconnect timer is active X-Git-Tag: submit/tizen/20220103.232749~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3f1e150ceb4ada38f3d921ed7d4f1a0e5771abc;p=platform%2Fupstream%2Fbluez.git Add avdtp ref when disconnect timer is active This will be unref either at disconnect_timeout or remove_disconnect_timer. Change-Id: I3638ba446200f6c4d82e5f0923c9086f3519c283 Signed-off-by: Ayush Garg --- diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c index 5ae4501e..26401f88 100644 --- a/profiles/audio/avdtp.c +++ b/profiles/audio/avdtp.c @@ -1568,6 +1568,9 @@ static void set_disconnect_timer_for_sink(struct avdtp *session, gboolean discon if (session->dc_timer) remove_disconnect_timer(session); + /* Take a ref while disconnect timer is active */ + avdtp_ref(session); + device_get_name(session->device, name, sizeof(name)); DBG("name : [%s]", name); if (g_str_equal(name, "VW BT") || g_str_equal(name, "VW MI") ||