Provide RFCOMM data to battery monitor frwk
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-rfcomm-server.c
index ee29302..2701d03 100644 (file)
@@ -341,6 +341,12 @@ static gboolean __data_received_cb(GIOChannel *chan, GIOCondition cond,
                        result, &data_r,
                        event_info->cb, event_info->user_data);
 
+       if (bluetooth_get_battery_monitor_state()) {
+               int ret = _bt_common_send_rfcomm_rx_details(&data_r);
+               if (ret != BLUETOOTH_ERROR_NONE)
+                       BT_ERR("RFCOMM received data details not sent to battery monitor frwk");
+       }
+
        g_free(buffer);
 
        return TRUE;