+
+ BT_DBG("Bt session starting...");
+ is_session_started = TRUE;
+
+ if (current_session_data == NULL)
+ current_session_data = g_malloc0(sizeof(_bt_battery_data_t));
+
+ current_session_data->session_start_time = time(NULL);
+ current_session_data->session_end_time = 0;
+ current_session_data->session_connected_time = 0;
+ current_session_data->session_scan_time = 0;
+ current_session_data->atm_list = NULL;
+
+ /* After starting session if there is no read data call during the specific time,
+ * stop the session time to avoid the exceed of session data.
+ */
+ if (session_timer)
+ g_source_remove(session_timer);
+
+ session_timer = g_timeout_add_seconds(BT_BM_SESSION_TIMEOUT,
+ (GSourceFunc)__bt_bm_session_timeout_cb, NULL);
+
+ return BLUETOOTH_ERROR_NONE;