From: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- server/char-device.h | 6 ++++-- server/reds.c | 8 ++++---- server/spicevmc.c | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/server/char-device.h b/server/char-device.h index a6315b0..3f81d13 100644 --- a/server/char-device.h +++ b/server/char-device.h @@ -212,8 +212,10 @@ void spice_char_device_write_buffer_release(SpiceCharDeviceState *dev, /* api for specific char devices */ -SpiceCharDeviceState *spicevmc_device_connect(SpiceCharDeviceInstance *sin, +SpiceCharDeviceState *spicevmc_device_connect(RedsState *reds, + SpiceCharDeviceInstance *sin, uint8_t channel_type); -void spicevmc_device_disconnect(SpiceCharDeviceInstance *char_device); +void spicevmc_device_disconnect(RedsState *reds, + SpiceCharDeviceInstance *char_device); #endif // CHAR_DEVICE_H_ diff --git a/server/reds.c b/server/reds.c index 496dfa2..1c777f5 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3103,13 +3103,13 @@ static int spice_server_char_device_add_interface(SpiceServer *s, } #endif else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0) { - dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_USBREDIR); + dev_state = spicevmc_device_connect(s, char_device, SPICE_CHANNEL_USBREDIR); } else if (strcmp(char_device->subtype, SUBTYPE_PORT) == 0) { if (strcmp(char_device->portname, "org.spice-space.webdav.0") == 0) { - dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_WEBDAV); + dev_state = spicevmc_device_connect(s, char_device, SPICE_CHANNEL_WEBDAV); } else { - dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_PORT); + dev_state = spicevmc_device_connect(s, char_device, SPICE_CHANNEL_PORT); } } @@ -3147,7 +3147,7 @@ static void spice_server_char_device_remove_interface(RedsState *reds, SpiceBase #endif else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0 || strcmp(char_device->subtype, SUBTYPE_PORT) == 0) { - spicevmc_device_disconnect(char_device); + spicevmc_device_disconnect(reds, char_device); } else { spice_warning("failed to remove char device %s", char_device->subtype); } diff --git a/server/spicevmc.c b/server/spicevmc.c index 4460eab..4fc95e3 100644 --- a/server/spicevmc.c +++ b/server/spicevmc.c @@ -504,7 +504,8 @@ static void spicevmc_connect(RedChannel *channel, RedClient *client, } } -SpiceCharDeviceState *spicevmc_device_connect(SpiceCharDeviceInstance *sin, +SpiceCharDeviceState *spicevmc_device_connect(RedsState *reds, + SpiceCharDeviceInstance *sin, uint8_t channel_type) { static uint8_t id[256] = { 0, }; @@ -554,7 +555,7 @@ SpiceCharDeviceState *spicevmc_device_connect(SpiceCharDeviceInstance *sin, } /* Must be called from RedClient handling thread. */ -void spicevmc_device_disconnect(SpiceCharDeviceInstance *sin) +void spicevmc_device_disconnect(RedsState *reds, SpiceCharDeviceInstance *sin) { SpiceVmcState *state; -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel