mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
avb: make sure to no blindly use the type as a command index
This commit is contained in:
parent
172f969650
commit
32bb568225
1 changed files with 6 additions and 2 deletions
|
|
@ -177,8 +177,12 @@ static int acmp_message(void *data, uint64_t now, const void *message, int len)
|
||||||
|
|
||||||
mtype = AVB_PACKET_ACMP_GET_MESSAGE_TYPE(p);
|
mtype = AVB_PACKET_ACMP_GET_MESSAGE_TYPE(p);
|
||||||
|
|
||||||
|
if (mtype < 0 || (size_t)mtype >= SPA_N_ELEMENTS(acmp_cmd_names)) {
|
||||||
|
pw_log_info("got ACMP message %d (unknown)", mtype);
|
||||||
|
} else {
|
||||||
pw_log_info("got ACMP message %s", acmp_cmd_names[mtype]);
|
pw_log_info("got ACMP message %s", acmp_cmd_names[mtype]);
|
||||||
avb_log_state(server, acmp_cmd_names[mtype]);
|
avb_log_state(server, acmp_cmd_names[mtype]);
|
||||||
|
}
|
||||||
|
|
||||||
switch (mtype) {
|
switch (mtype) {
|
||||||
case AVB_ACMP_MESSAGE_TYPE_CONNECT_RX_COMMAND:
|
case AVB_ACMP_MESSAGE_TYPE_CONNECT_RX_COMMAND:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue