Lines Matching refs:active

68 } active;  variable
111 for (size_t i = 0U; i < active.members_count; i++) { in active_members_reset()
112 const struct bt_csip_set_coordinator_set_member *member = active.members[i]; in active_members_reset()
119 (void)memset(&active, 0, sizeof(active)); in active_members_reset()
185 member = active.members[active.members_handled]; in get_next_active_instance()
187 svc_inst = lookup_instance_by_set_info(member, &active.info); in get_next_active_instance()
204 svc_inst_1 = lookup_instance_by_set_info(member_1, &active.info); in member_rank_compare_asc()
205 svc_inst_2 = lookup_instance_by_set_info(member_2, &active.info); in member_rank_compare_asc()
233 (void)memcpy(active.members, members, count * sizeof(members[0U])); in active_members_store_ordered()
234 active.members_count = count; in active_members_store_ordered()
235 memcpy(&active.info, info, sizeof(active.info)); in active_members_store_ordered()
238 qsort(active.members, count, sizeof(members[0U]), in active_members_store_ordered()
244 lookup_instance_by_set_info(active.members[i - 1U], info); in active_members_store_ordered()
246 lookup_instance_by_set_info(active.members[i], info); in active_members_store_ordered()
1073 active.members_restored++; in csip_set_coordinator_write_restore_cb()
1074 LOG_DBG("Restored %u/%u members", active.members_restored, active.members_handled); in csip_set_coordinator_write_restore_cb()
1076 if (active.members_restored < active.members_handled && in csip_set_coordinator_write_restore_cb()
1081 member = active.members[active.members_handled - active.members_restored - 1]; in csip_set_coordinator_write_restore_cb()
1082 client->cur_inst = lookup_instance_by_set_info(member, &active.info); in csip_set_coordinator_write_restore_cb()
1092 LOG_DBG("Failed to release next member[%u]: %d", active.members_handled, in csip_set_coordinator_write_restore_cb()
1110 if (active.members_handled > 0 && CONFIG_BT_MAX_CONN > 1) { in csip_set_coordinator_write_lock_cb()
1114 active.members_restored = 0; in csip_set_coordinator_write_lock_cb()
1116 member = active.members[active.members_handled - 1]; in csip_set_coordinator_write_lock_cb()
1117 client->cur_inst = lookup_instance_by_set_info(member, &active.info); in csip_set_coordinator_write_lock_cb()
1140 active.members_handled++; in csip_set_coordinator_write_lock_cb()
1141 LOG_DBG("Locked %u/%u members", active.members_handled, active.members_count); in csip_set_coordinator_write_lock_cb()
1143 if (active.members_handled < active.members_count) { in csip_set_coordinator_write_lock_cb()
1157 LOG_DBG("Failed to lock next member[%u]: %d", active.members_handled, in csip_set_coordinator_write_lock_cb()
1160 active.members_restored = 0; in csip_set_coordinator_write_lock_cb()
1189 active.members_handled++; in csip_set_coordinator_write_release_cb()
1190 LOG_DBG("Released %u/%u members", active.members_handled, active.members_count); in csip_set_coordinator_write_release_cb()
1192 if (active.members_handled < active.members_count) { in csip_set_coordinator_write_release_cb()
1205 LOG_DBG("Failed to release next member[%u]: %d", active.members_handled, in csip_set_coordinator_write_release_cb()
1217 const struct bt_csip_set_coordinator_set_info *info = &active.info; in csip_set_coordinator_lock_state_read_cb()
1221 cur_member = active.members[active.members_handled]; in csip_set_coordinator_lock_state_read_cb()
1222 } else if (active.oap_cb == NULL || !active.oap_cb(info, active.members, in csip_set_coordinator_lock_state_read_cb()
1223 active.members_count)) { in csip_set_coordinator_lock_state_read_cb()
1247 active.members_handled++; in csip_set_coordinator_read_lock_cb()
1248 LOG_DBG("Read lock state on %u/%u members", active.members_handled, active.members_count); in csip_set_coordinator_read_lock_cb()
1278 if (active.members_handled < active.members_count) { in csip_set_coordinator_read_lock_cb()
1290 LOG_DBG("Failed to read next member[%u]: %d", active.members_handled, in csip_set_coordinator_read_lock_cb()
1588 if (active.in_progress) { in csip_set_coordinator_get_lock_state()
1609 svc_inst = lookup_instance_by_set_info(active.members[i], &active.info); in csip_set_coordinator_get_lock_state()
1620 active.in_progress = true; in csip_set_coordinator_get_lock_state()
1626 active.members_handled++; in csip_set_coordinator_get_lock_state()
1629 if (!active.in_progress && err == 0) { in csip_set_coordinator_get_lock_state()
1634 if (active.oap_cb == NULL || in csip_set_coordinator_get_lock_state()
1635 !active.oap_cb(&active.info, active.members, active.members_count)) { in csip_set_coordinator_get_lock_state()
1639 ordered_access_complete(&active.info, err, false, NULL); in csip_set_coordinator_get_lock_state()
1654 active.oap_cb = cb; in bt_csip_set_coordinator_ordered_access()
1658 active.oap_cb = NULL; in bt_csip_set_coordinator_ordered_access()
1699 CHECKIF(active.in_progress) { in bt_csip_set_coordinator_lock()
1721 svc_inst = lookup_instance_by_set_info(active.members[0], &active.info); in bt_csip_set_coordinator_lock()
1732 active.in_progress = true; in bt_csip_set_coordinator_lock()
1745 CHECKIF(active.in_progress) { in bt_csip_set_coordinator_release()
1767 svc_inst = lookup_instance_by_set_info(active.members[0], &active.info); in bt_csip_set_coordinator_release()
1778 active.in_progress = true; in bt_csip_set_coordinator_release()