Lines Matching refs:srv
126 struct bt_mesh_proxy_server *srv = user_data; in proxy_connected() local
128 srv->role = bt_mesh_proxy_role_setup(conn, bt_mesh_gatt_send, in proxy_connected()
134 struct bt_mesh_proxy_server *srv = find_proxy_srv_by_conn(conn); in proxy_link_open() local
136 srv->link_opened = true; in proxy_link_open()
141 struct bt_mesh_proxy_server *srv = find_proxy_srv_by_conn(conn); in proxy_disconnected() local
143 bt_mesh_proxy_role_cleanup(srv->role); in proxy_disconnected()
145 srv->role = NULL; in proxy_disconnected()
146 srv->link_opened = false; in proxy_disconnected()
163 struct bt_mesh_proxy_server *srv; in proxy_srv_check_and_get() local
165 srv = find_proxy_srv(sub->net_idx, true, true); in proxy_srv_check_and_get()
166 if (srv) { in proxy_srv_check_and_get()
167 if (srv->role) { in proxy_srv_check_and_get()
174 if (!srv) { in proxy_srv_check_and_get()
175 srv = find_proxy_srv(BT_MESH_KEY_UNUSED, false, true); in proxy_srv_check_and_get()
176 if (!srv) { in proxy_srv_check_and_get()
185 *p_srv = srv; in proxy_srv_check_and_get()
203 struct bt_mesh_proxy_server *srv; member
242 return proxy_srv_check_and_get(sub, net_id, &res->srv); in has_net_id()
253 res.srv = NULL; in handle_net_id()
271 if (sub && res.srv) { in handle_net_id()
272 err = bt_mesh_gatt_cli_connect(info->addr, &proxy, res.srv); in handle_net_id()
307 struct bt_mesh_proxy_server *srv; in bt_mesh_proxy_connect() local
319 srv = find_proxy_srv(net_idx, true, true); in bt_mesh_proxy_connect()
320 if (srv) { in bt_mesh_proxy_connect()
324 srv = find_proxy_srv(BT_MESH_KEY_UNUSED, false, true); in bt_mesh_proxy_connect()
325 if (!srv) { in bt_mesh_proxy_connect()
329 srv->net_idx = net_idx; in bt_mesh_proxy_connect()
337 struct bt_mesh_proxy_server *srv; in bt_mesh_proxy_disconnect() local
340 srv = find_proxy_srv(net_idx, true, true); in bt_mesh_proxy_disconnect()
341 if (!srv) { in bt_mesh_proxy_disconnect()
345 srv->net_idx = BT_MESH_KEY_UNUSED; in bt_mesh_proxy_disconnect()
347 if (!srv->role) { in bt_mesh_proxy_disconnect()
351 return bt_conn_disconnect(srv->role->conn, in bt_mesh_proxy_disconnect()