Handle GATT client app's termination
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / oal-gatt.c
index af15692..90c9e62 100644 (file)
@@ -213,7 +213,7 @@ static void cb_gattc_write_descriptor(int conn_id, int status, btgatt_write_para
 static void cb_gattc_register_for_notification(int conn_id, int registered, int status,
                        btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id);
 static void cb_gattc_notify(int conn_id, btgatt_notify_params_t *p_data);
-static void cb_gattc_service_changed(bt_bdaddr_t *bd_addr, int change_type, uint8_t *uuid, int conn_id);
+static void cb_gattc_service_changed(bt_bdaddr_t *bd_addr, int change_type, uint8_t *uuid, int conn_id, int inst_id);
 static void cb_gattc_configure_mtu_cmpl(int conn_id, int status, int mtu);
 
 /*TODO GATT CLient callbacks will be implemented in subsequent patches */
@@ -1606,7 +1606,7 @@ static void cb_gattc_notify(int conn_id, btgatt_notify_params_t *p_data)
        }
 }
 
-static void cb_gattc_service_changed(bt_bdaddr_t *bd_addr, int change_type, uint8_t *uuid, int conn_id)
+static void cb_gattc_service_changed(bt_bdaddr_t *bd_addr, int change_type, uint8_t *uuid, int conn_id, int inst_id)
 {
        event_gattc_service_changed_data *event = g_new0(event_gattc_service_changed_data, 1);
 
@@ -1614,6 +1614,7 @@ static void cb_gattc_service_changed(bt_bdaddr_t *bd_addr, int change_type, uint
        event->change_type = change_type;
        memcpy(event->uuid.uuid, uuid, sizeof(event->uuid.uuid));
        event->conn_id = conn_id;
+       event->inst_id = inst_id;
 
        send_event_bda_trace(OAL_EVENT_GATTC_SERVICE_CHANGED_IND, event, sizeof(*event), (bt_address_t *)bd_addr);
 }