Example #1
0
void btadp_jsr82_session_disconnected(BT_ADP_JSR82_SESSION *session)
{
	int length = 0;
	BOOL closesession = FALSE;
	BT_ADP_JSR82_SESSION *server_session = NULL;
	ASSERT(session);

	OS_Report("[JSR82]btadp_jsr82_session_disconnected :id[%4x], conn_id[%d], identify[%d]",
				session->sessionid, session->index, session->identify);

	session->conn_state = BT_ADP_JSR82_STATE_DISCONNECTING;	

	if(!BTCoreVerifySysInitState() || BTCoreIsDeinitializing())
	{
		closesession = TRUE;
		goto exit;
	}
	server_session = btadp_jsr82_find_session_by_role_index(JSR82_SESSION_ROLE_SERVER, session->index);
	if(server_session)
	{
		server_session->active_conn--;
		btadp_jsr82_server_disconnected(server_session);
	}
	else
	{
		OS_Report("[JSR]no matching for this session:index[%d]");
	}
	
exit:
	bt_session_destroy(session->sessionid);
	btadp_jsr82_session_deinit(session);
}
Example #2
0
void BTUartTriggerReadUart(void)
{
    if(BTCoreVerifySysInitState() == 1)
        BTAdpUartCtx.cb_func(0x01);
}