mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pod: handle NULL
This commit is contained in:
parent
e28b5f91b8
commit
3dba9f0fd4
10 changed files with 121 additions and 111 deletions
|
|
@ -153,14 +153,15 @@ connection_data (SpaSource *source,
|
|||
}
|
||||
if (opcode >= resource->iface->n_methods) {
|
||||
pinos_log_error ("protocol-native %p: invalid method %u", client->impl, opcode);
|
||||
continue;
|
||||
client_destroy (client);
|
||||
break;
|
||||
}
|
||||
demarshal = resource->iface->methods;
|
||||
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);
|
||||
if (!demarshal[opcode] || !demarshal[opcode] (resource, message, size)) {
|
||||
pinos_log_error ("protocol-native %p: invalid message received", client->impl);
|
||||
client_destroy (client);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue