mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-24 07:00:05 -05:00
pod-builder: make more generic builder
Make a vararg based builder that produces much smaller code. Catch demarshal errors. Simplify array handling
This commit is contained in:
parent
f92b68c3c3
commit
78a3cd61b8
9 changed files with 862 additions and 637 deletions
|
|
@ -163,9 +163,10 @@ connection_data (SpaSource *source,
|
|||
continue;
|
||||
}
|
||||
demarshal = resource->demarshal;
|
||||
if (demarshal[opcode])
|
||||
demarshal[opcode] (resource, message, size);
|
||||
else
|
||||
if (demarshal[opcode]) {
|
||||
if (!demarshal[opcode] (resource, message, size))
|
||||
pinos_log_error ("protocol-native %p: invalid message received", client->impl);
|
||||
} else
|
||||
pinos_log_error ("protocol-native %p: function %d not implemented", client->impl, opcode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue