mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
test-playback: Pass proper types to spice_server_add_interface
This is a revert of b76e561d.
For a SpicePlaybackInstance, the base interface must be a
SpicePlaybackInterface instance, not a SpiceBaseInterface instance, or
spice-server code will end up reading out of bounds.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
1afa86c3ee
commit
f5494cfa9b
@ -36,11 +36,11 @@
|
||||
|
||||
SpicePlaybackInstance playback_instance;
|
||||
|
||||
static const SpiceBaseInterface base = {
|
||||
.type = SPICE_INTERFACE_PLAYBACK,
|
||||
.description = "test playback",
|
||||
.major_version = SPICE_INTERFACE_PLAYBACK_MAJOR,
|
||||
.minor_version = SPICE_INTERFACE_PLAYBACK_MINOR,
|
||||
static const SpicePlaybackInterface playback_sif = {
|
||||
.base.type = SPICE_INTERFACE_PLAYBACK,
|
||||
.base.description = "test playback",
|
||||
.base.major_version = SPICE_INTERFACE_PLAYBACK_MAJOR,
|
||||
.base.minor_version = SPICE_INTERFACE_PLAYBACK_MINOR,
|
||||
};
|
||||
|
||||
uint32_t *frame;
|
||||
@ -112,7 +112,7 @@ int main(void)
|
||||
spice_server_set_noauth(server);
|
||||
spice_server_init(server, core);
|
||||
|
||||
playback_instance.base.sif = &base;
|
||||
playback_instance.base.sif = &playback_sif.base;
|
||||
spice_server_add_interface(server, &playback_instance.base);
|
||||
spice_server_playback_start(&playback_instance);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user