Fix for "In Progress" error while media audio conn 73/140273/1
authorSreeraj Mohan Kottapuzhackal <sreeraj.mk@samsung.com>
Mon, 24 Jul 2017 07:43:24 +0000 (13:13 +0530)
committerSreeraj Mohan Kottapuzhackal <sreeraj.mk@samsung.com>
Mon, 24 Jul 2017 09:03:52 +0000 (14:33 +0530)
[Model] All
[BinType] AP
[Customer] All

[Issue#] PLM
[Request] P170221-05634, P170221-06954
[Occurrence Version] All

[Problem] Media audio connection request was returning "In Progress" error
[Cause & Measure] Cause: While a media audio connect returned with error,
and its req_info was already removed after HF connection. Then the device will
not be removed from connecting_list, thus returning error there after for each
connection request
                  Measure: The device must be removed from connecting_list
even if the req_info is NULL.
[Checking Method] Unit testing

[Team] Connectivity
[Developer] sreeraj.mk
[Solution company] Samsung
[Change Type] N/A

Change-Id: Ibdb62ae67e7430992980cf0f775fd78366d38bf8

bt-service/bt-service-audio.c

index c889216..53fe754 100644 (file)
@@ -208,12 +208,6 @@ static void __bt_audio_request_cb(GDBusProxy *proxy, GAsyncResult *res,
        }
 
 check_req_info:
-       req_info = _bt_get_request_info(func_data->req_id);
-       if (req_info == NULL) {
-               BT_ERR("req_info == NULL");
-               goto done;
-       }
-
        if (g_error == NULL)
                goto dbus_return;
 
@@ -243,8 +237,12 @@ check_req_info:
 
        /* Event will be sent by the event reciever */
 dbus_return:
-       if (req_info->context == NULL) {
-               BT_DBG("req_info->context is NULL");
+       req_info = _bt_get_request_info(func_data->req_id);
+       if (req_info == NULL) {
+               BT_ERR("req_info == NULL");
+               goto done;
+       } else if (req_info->context == NULL) {
+               BT_ERR("req_info->context is NULL");
                goto done;
        }