[Spice-devel] [PATCH server] Associate org.spice-space.webdav.0 port to webdav channel
Marc-André Lureau
marcandre.lureau at gmail.com
Sun Jan 12 09:34:18 PST 2014
For example, with qemu, a webdav channel can be created this way:
-chardev spiceport,name=org.spice-space.webdav.0,...
And redirected to a virtio port:
-device virtserialport,...,name=org.spice-space.webdav.0
---
server/reds.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/server/reds.c b/server/reds.c
index 2a0002b..2c63154 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3668,7 +3668,11 @@ static int spice_server_char_device_add_interface(SpiceServer *s,
dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_USBREDIR);
}
else if (strcmp(char_device->subtype, SUBTYPE_PORT) == 0) {
- dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_PORT);
+ if (strcmp(char_device->portname, "org.spice-space.webdav.0") == 0) {
+ dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_WEBDAV);
+ } else {
+ dev_state = spicevmc_device_connect(char_device, SPICE_CHANNEL_PORT);
+ }
}
if (dev_state) {
@@ -4206,6 +4210,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_channel_security(SpiceServer *s, const c
[ SPICE_CHANNEL_SMARTCARD] = "smartcard",
#endif
[ SPICE_CHANNEL_USBREDIR ] = "usbredir",
+ [ SPICE_CHANNEL_WEBDAV ] = "webdav",
};
int i;
--
1.8.4.2
More information about the Spice-devel
mailing list