Lines Matching refs:t
2320 struct fc_channel *t = fc_channels; in fcchan_get() local
2335 while (t && t->chan != chan) in fcchan_get()
2336 t = t->next; in fcchan_get()
2338 if (t) in fcchan_get()
2339 return t; in fcchan_get()
2343 t = osi_calloc(sizeof(*t)); in fcchan_get()
2344 if (!t) in fcchan_get()
2347 t->chan = chan; in fcchan_get()
2350 osi_free(t); in fcchan_get()
2355 t->next = fc_channels; in fcchan_get()
2356 fc_channels = t; in fcchan_get()
2358 return t; in fcchan_get()
2364 struct fc_client *t = start; in fcclient_find_by_addr() local
2366 while (t) { in fcclient_find_by_addr()
2369 if (addr && !memcmp(addr, &t->remote_addr, sizeof(t->remote_addr))) in fcclient_find_by_addr()
2373 if (!addr && t->server) in fcclient_find_by_addr()
2376 t = t->next_all_list; in fcclient_find_by_addr()
2379 return t; in fcclient_find_by_addr()
2384 struct fc_client *t = fc_clients; in fcclient_find_by_id() local
2386 while (t && t->id != id) in fcclient_find_by_id()
2387 t = t->next_all_list; in fcclient_find_by_id()
2389 return t; in fcclient_find_by_id()
2395 struct fc_client *t; in fcclient_alloc() local
2409 t = osi_calloc(sizeof(*t)); in fcclient_alloc()
2410 if (t) { in fcclient_alloc()
2413 t->id = ++fc_next_id; in fcclient_alloc()
2414 } while (!t->id || fcclient_find_by_id(t->id)); in fcclient_alloc()
2417 t->chan = chan; in fcclient_alloc()
2418 t->server = server; in fcclient_alloc()
2421 t->sec_id = sec_id; in fcclient_alloc()
2424 t->next_all_list = fc_clients; in fcclient_alloc()
2425 fc_clients = t; in fcclient_alloc()
2428 t->next_chan_list = fc->clients; in fcclient_alloc()
2429 fc->clients = t; in fcclient_alloc()
2437 return t; in fcclient_alloc()
2442 struct fc_client *t = fc_clients; in fcclient_free() local
2446 while (t && t->next_all_list != fc) in fcclient_free()
2447 t = t->next_all_list; in fcclient_free()
2449 if (!t && fc != fc_clients) in fcclient_free()
2452 if (t) in fcclient_free()
2453 t->next_all_list = fc->next_all_list; in fcclient_free()
2459 t = tc->clients; in fcclient_free()
2461 while (t && t->next_chan_list != fc) in fcclient_free()
2462 t = t->next_chan_list; in fcclient_free()
2464 if (t) in fcclient_free()
2465 t->next_chan_list = fc->next_chan_list; in fcclient_free()
2485 struct fc_client *t = NULL, *new_conn; in fcchan_conn_chng_cbk() local
2493 t = fcclient_find_by_addr(tc->clients, bd_addr); // try to find an open socked for that addr in fcchan_conn_chng_cbk()
2494 if (t) { in fcchan_conn_chng_cbk()
2495 p_cback = t->p_cback; in fcchan_conn_chng_cbk()
2496 user_data = t->user_data; in fcchan_conn_chng_cbk()
2498 … t = fcclient_find_by_addr(tc->clients, NULL); // try to find a listening socked for that channel in fcchan_conn_chng_cbk()
2499 if (t) { in fcchan_conn_chng_cbk()
2501 new_conn = fcclient_alloc(chan, FALSE, &t->sec_id); in fcchan_conn_chng_cbk()
2508 p_cback = t->p_cback; in fcchan_conn_chng_cbk()
2509 user_data = t->user_data; in fcchan_conn_chng_cbk()
2511 t = new_conn; in fcchan_conn_chng_cbk()
2520 if (t) { in fcchan_conn_chng_cbk()
2522 if (!t->init_called) { in fcchan_conn_chng_cbk()
2525 t->init_called = TRUE; in fcchan_conn_chng_cbk()
2527 init_evt.l2c_cl_init.handle = t->id; in fcchan_conn_chng_cbk()
2529 init_evt.l2c_cl_init.sec_id = t->sec_id; in fcchan_conn_chng_cbk()
2532 open_evt.l2c_open.handle = t->id; in fcchan_conn_chng_cbk()
2534 … memcpy(&open_evt.l2c_le_open.rem_bda, &t->remote_addr, sizeof(open_evt.l2c_le_open.rem_bda)); in fcchan_conn_chng_cbk()
2535 open_evt.l2c_le_open.p_p_cback = (void**)&t->p_cback; in fcchan_conn_chng_cbk()
2536 open_evt.l2c_le_open.p_user_data = &t->user_data; in fcchan_conn_chng_cbk()
2542 fcclient_free(t); in fcchan_conn_chng_cbk()
2553 if (!t->p_cback) /* no callback set, means they do not want this one... */ in fcchan_conn_chng_cbk()
2554 fcclient_free(t); in fcchan_conn_chng_cbk()
2563 struct fc_client *t = NULL; in fcchan_data_cbk() local
2569 …t = fcclient_find_by_addr(tc->clients, bd_addr); // try to find an open socked for that addr and c… in fcchan_data_cbk()
2570 if (!t) { in fcchan_data_cbk()
2576 sock_cback = t->p_cback; in fcchan_data_cbk()
2577 sock_user_data = t->user_data; in fcchan_data_cbk()
2578 evt_data.le_data_ind.handle = t->id; in fcchan_data_cbk()
2601 struct fc_client *t; in bta_jv_l2cap_connect_le() local
2606 t = fcclient_alloc(cc->remote_chan, FALSE, NULL); in bta_jv_l2cap_connect_le()
2607 if (!t) { in bta_jv_l2cap_connect_le()
2612 t->p_cback = cc->p_cback; in bta_jv_l2cap_connect_le()
2613 t->user_data = cc->user_data; in bta_jv_l2cap_connect_le()
2614 memcpy(&t->remote_addr, &cc->peer_bd_addr, sizeof(t->remote_addr)); in bta_jv_l2cap_connect_le()
2615 id = t->id; in bta_jv_l2cap_connect_le()
2616 t->init_called = FALSE; in bta_jv_l2cap_connect_le()
2618 if (L2CA_ConnectFixedChnl(t->chan, t->remote_addr)) { in bta_jv_l2cap_connect_le()
2625 t = fcclient_find_by_id(id); in bta_jv_l2cap_connect_le()
2626 if (t) { in bta_jv_l2cap_connect_le()
2628 call_init_f = !t->init_called; in bta_jv_l2cap_connect_le()
2630 fcclient_free(t); in bta_jv_l2cap_connect_le()
2634 t->init_called = TRUE; in bta_jv_l2cap_connect_le()
2691 struct fc_client *t; in bta_jv_l2cap_start_server_le() local
2698 t = fcclient_alloc(ss->local_chan, TRUE, NULL); in bta_jv_l2cap_start_server_le()
2699 if (!t) in bta_jv_l2cap_start_server_le()
2702 t->p_cback = ss->p_cback; in bta_jv_l2cap_start_server_le()
2703 t->user_data = ss->user_data; in bta_jv_l2cap_start_server_le()
2707 evt_data.handle = t->id; in bta_jv_l2cap_start_server_le()
2708 evt_data.sec_id = t->sec_id; in bta_jv_l2cap_start_server_le()
2726 struct fc_client *t; in bta_jv_l2cap_close_fixed() local
2728 t = fcclient_find_by_id(cc->handle); in bta_jv_l2cap_close_fixed()
2729 if (t) in bta_jv_l2cap_close_fixed()
2730 fcclient_free(t); in bta_jv_l2cap_close_fixed()