add client_remove_by_index for reaper
This commit is contained in:
parent
a9f6f9f6ac
commit
9825ddb287
|
|
@ -86,6 +86,14 @@ static void client_remove_by_mac(const uint8_t *mac)
|
||||||
xSemaphoreGive(client_mutex);
|
xSemaphoreGive(client_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* caller must hold client_mutex */
|
||||||
|
static void client_remove_by_index(int idx)
|
||||||
|
{
|
||||||
|
if (idx < 0 || idx >= client_count) return;
|
||||||
|
printf("REAP: removing client %d\n", idx);
|
||||||
|
clients[idx] = clients[--client_count];
|
||||||
|
}
|
||||||
|
|
||||||
static void parse_udp_sysex(const uint8_t *data, uint16_t len)
|
static void parse_udp_sysex(const uint8_t *data, uint16_t len)
|
||||||
{
|
{
|
||||||
if (len < 3 || data[0] != 0xF0 || data[1] != 0x7D)
|
if (len < 3 || data[0] != 0xF0 || data[1] != 0x7D)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue