Revision 52fe0e75 spice-qemu-char.c
b/spice-qemu-char.c | ||
---|---|---|
85 | 85 |
{ |
86 | 86 |
SpiceCharDriver *scd = container_of(sin, SpiceCharDriver, sin); |
87 | 87 |
|
88 |
#if SPICE_SERVER_VERSION < 0x000901 |
|
89 |
/* |
|
90 |
* spice-server calls the state callback for the agent channel when the |
|
91 |
* spice client connects / disconnects. Given that not the client but |
|
92 |
* the server is doing the parsing of the messages this is wrong as the |
|
93 |
* server is still listening. Worse, this causes the parser in the server |
|
94 |
* to go out of sync, so we ignore state calls for subtype vdagent |
|
95 |
* spicevmc chardevs. For the full story see: |
|
96 |
* http://lists.freedesktop.org/archives/spice-devel/2011-July/004837.html |
|
97 |
*/ |
|
98 |
if (strcmp(sin->subtype, "vdagent") == 0) { |
|
99 |
return; |
|
100 |
} |
|
101 |
#endif |
|
102 |
|
|
103 | 88 |
if ((scd->chr->be_open && connected) || |
104 | 89 |
(!scd->chr->be_open && !connected)) { |
105 | 90 |
return; |
... | ... | |
224 | 209 |
|
225 | 210 |
CharDriverState *qemu_chr_open_spice_vmc(const char *type) |
226 | 211 |
{ |
227 |
CharDriverState *chr; |
|
228 | 212 |
const char **psubtype = spice_server_char_device_recognized_subtypes(); |
229 | 213 |
|
230 | 214 |
if (type == NULL) { |
... | ... | |
243 | 227 |
return NULL; |
244 | 228 |
} |
245 | 229 |
|
246 |
chr = chr_open(type); |
|
247 |
|
|
248 |
#if SPICE_SERVER_VERSION < 0x000901 |
|
249 |
/* See comment in vmc_state() */ |
|
250 |
if (strcmp(type, "vdagent") == 0) { |
|
251 |
qemu_chr_generic_open(chr); |
|
252 |
} |
|
253 |
#endif |
|
254 |
|
|
255 |
return chr; |
|
230 |
return chr_open(type); |
|
256 | 231 |
} |
257 | 232 |
|
258 | 233 |
#if SPICE_SERVER_VERSION >= 0x000c02 |
Also available in: Unified diff