Hi,

While looking at a crash in qemu when SPICE_INTERFACE_PLAYBACK_MINOR was
increased, I came across the version checking code in spice_server_add_interface
in server/reds.c which does stuff like

if (strcmp(interface->type, SPICE_INTERFACE_RECORD) == 0) {
    red_printf("SPICE_INTERFACE_RECORD");
    if (interface->major_version != SPICE_INTERFACE_RECORD_MAJOR ||
        interface->minor_version < SPICE_INTERFACE_RECORD_MINOR) {
        red_printf("unsupported record interface");
        return -1;
    }
    snd_attach_record(SPICE_CONTAINEROF(sin, SpiceRecordInstance, base));
}

interface->major_version/interface->minor_version are filled in
qemu/audio/spiceaudio.c using compile time constants from spice-server.
It seems to be useful to detect when qemu was compiled against an older
spice-server than the one that is currently installed.
I'm a bit surprised by this mechanism, if we break these interfaces in such
a way that qemu needs to be recompiled, shouldn't we use different library
sonames to make sure things are recompiled?

I'm basically curious about exactly what problem is this mechanism solving
so that I don't break it by mistake :)

Thanks,

Christophe

Attachment: pgpWNuSxu0WJS.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to