summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
...
* server: break read_from_vdi_port loop if the guest gets disconnectedHans de Goede2011-04-011-1/+1
| | | | | | | read_from_vdi_port calls dispatch_vdi_port data, which will disconnect the guest agent if it sends invalid data. It would then try to read more data from the disconnected guest agent resulting in a NULL ptr dereference, this patch fixes this.
* server: Don't stop writing agent data to the guest when the client disconnectsHans de Goede2011-04-011-2/+2
| | | | | | | | write_to_vdi_port() was checking for reds->agent_state.connected to determine wether it could write queued data. But agent_state.connected reflects if *both* ends are connected. If the client has disconnected, but the guest agent is still connected and some data is still pending (like a final clipboard release from the client), then this data should be written to the guest agent.
* server: Don't reset agent state when the client disconnectsHans de Goede2011-04-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were calling reds_reset_vdp on client disconnect, which is not a good idea. reds_reset_vdp does 3 things: 1) It resets the state related to reading chunks from the spicevmc virtio port. If the client disconnects while the guest agent is in the middle of sending a chunk, this will lead to an inconsistent state, and lots of printing of "dispatch_vdi_port_data: invalid port" messages caused by this inconsistent state sometimes followed by a segfault. This can be triggered by copy and pasting something large (say a screenshot) from the guest to the spice-gtk client, as the spice-gtk client currently has a bug causing it to crash when receiving a multi chunk vdagent messages. Without this patch (and with the spice-gtk bug present) I can consistently reproduce this. 2) It clears any buffered writes from the client to the guest still pending because the virtio port cannot consume data fast enough. Since the agent itself is still running fine, throwing away writes for it because the client has disconnected makes no sense. Esp, since on clean exit the client may very well send a clipboard release message directly before closing the connection, and this may get lost this way. 3) It sets client_agent_started to false, this is the only thing which actually makes sense to do on client disconnect. Note that since we no longer reset the vdp state on client disconnect, we must now reset it on agent disconnect even if we don't have a client. So the reds_reset_vdp call in reds_agent_remove() gets moved to the top, above both the agent_state.connected and reds->peer checks which will both fail in the no client case.
* server: Make copy paste support configurableHans de Goede2011-03-242-3/+14
| | | | | | Also bump SPICE_SERVER_VERSION to 0x000801 as 0.8.1 will be the first version with the new API for this, and we need to be able to detect the presence of this API in qemu.
* spice-server: Add the ability to filter agent messagesHans de Goede2011-03-244-3/+164
|
* server/reds: allow call to reds_agent_remove even if it is goneAlon Levy2011-03-081-4/+4
| | | | | | | | | | | | | | | | | | | | | The current assert(reds->agent_state.connected) tiggers if when the agent disconnected there was still data waiting to be sent (for instance if there is a bug in the client handling clipboard and it is killed while a large clipboard transfer is in progress). So first call to reds_agent_remove happens from spice_server_char_device_remove_interface, and then it is called again (triggering the assert) from free_item_data from read_from_vdi_port because of the channel destruction. Other option would be to not call it from one of the paths - but that is suboptimal: * if there is no data in the pipe, the second call never happens. * the second call has to be there anyway, because it may fail during parsing data from the agent. This patch fixes a segfault on this assert when a client starts passing from guest agent to client a large clipboard and dies in the middle. There is still another assert happening occasionally at marshaller which I don't have a fix for (but it doesn't seem to be related).
* Release 0.8.00.8.0Hans de Goede2011-03-011-1/+1
|
* fix spice-server segfault on migrationGerd Hoffmann2011-02-151-0/+4
| | | | | | | spice-server tries to use the migration information without checking whenever this is available in the first place ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Release 0.7.30.7.3Hans de Goede2011-02-111-1/+1
|
* server/smartcard: don't push our own error on reader addAlon Levy2011-02-101-3/+3
| | | | | | | | | | | | | | The device already sends one. There are actually two connections going on: server to client - this is the smartcard channel, it reuses the VSC protocol. server to device - this is an internal connection using VSC too. We generally just passthrough all messages from the client to the device, and from the device to the client. We only rewrite the reader_id because the device knows about a single id (it is actually a card id), and we may manage more then one in the future. Bottom line is that there was an extra VSC_Error message reaching the client.
* server/smartcard: ignore VSC_Init from clientAlon Levy2011-02-101-0/+3
|
* server/smartcard: print instead of assert on bad reader_id in ↵Alon Levy2011-02-101-1/+3
| | | | smartcard_char_device_on_message_from_device
* server/smartcard: libcacard uses network byte order, so we must tooAlon Levy2011-02-101-6/+19
|
* server/smartcard: libcacard removed ReaderAddResponseAlon Levy2011-02-101-42/+4
|
* server/smartcard: s/reader_id_t/uint32_t/ (libcacard changed)Alon Levy2011-02-101-6/+6
|
* server/red_worker: fix used but uninitialized warning (gcc 4.6.0)Alon Levy2011-02-071-1/+1
|
* client/server: warning fixes (gcc 4.6.0)Alon Levy2011-01-274-19/+6
| | | | | gcc 4.6.0 added "[-Werror=unused-but-set-variable]", this and the next few fixes tend to that. Mostly harmless.
* client/server: add missing USE_TUNNELAlon Levy2011-01-251-0/+2
| | | | | disable some code that only makes sense when USE_TUNNEL is defined in client and server channel security level setting.
* client/server: add missing smartchannel channel security handlingAlon Levy2011-01-251-0/+3
| | | | | The name to channel id mapping for the smartcard channel is missing, add it in client and server.
* Update license header for server/red_parse_qxl.cHans de Goede2011-01-211-6/+6
| | | | This one mistakenly had a GPL header rather then an LGPL header.
* Release 0.7.20.7.2Hans de Goede2011-01-191-1/+1
|
* server/red_worker: use 1, not 4 when lz_encoding a top down imageAlon Levy2011-01-171-2/+3
|
* Release 0.7.10.7.1Hans de Goede2010-12-171-1/+1
|
* Makefiles: fix server/tests/test_util.h not being included in make distHans de Goede2010-12-171-2/+2
|
* server: Update SPICE_SERVER_VERSIONHans de Goede2010-12-171-1/+1
|
* server/red_worker: fix worker->drawable_countAlon Levy2010-12-161-1/+1
| | | | | | | | | | | | | drawable_count was becoming negative. It tracks the number of items in the worker->current_list ring. It was decremented correctly, but incremented only in several cases. The cases it wasn't incremented where: red_current_add_equal found an equivalent drawable by moving the increment to where the item is added to current_list, in __current_add_drawable, the accounting remains correct. This has no affect other then correct accounting, as drawable_count isn't used for anything.
* move chardevs out of experimentalGerd Hoffmann2010-12-162-25/+26
| | | | | | | | | While we are at it: There is no reason for chardev support to stay in the experimental area, so move it out. qemu should not need the "spice-experimental.h" file. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 7bbc2ba090788d844573e044041480ff6e3cba7b)
* move switch-host migration out of experimentalGerd Hoffmann2010-12-162-5/+8
| | | | | | | | seamless stays in the experimental area. comments updates too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 6acb817071daa13b8389bfce12cac6221997cebe)
* client migration: switch hostGerd Hoffmann2010-12-162-11/+59
| | | | | | | | | | | | | | | | | Implement server-side support for switch-host client migration. Client side support is present already in the tree. Setting the migration information is done using the existing spice_server_migrate_info() function. A new spice_server_migrate_switch() function has been added which triggers sending out the switch-host message. Seamless migration functions are left there for now. spice_server_migrate_start() has been chamnged to just fail unconditionally though as seamless migration is broken anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 4b1ea4e102bb8a737487dab51dd0f3fc94352948)
* server: improve error handlingGerd Hoffmann2010-12-091-8/+24
| | | | | | | | | We should pass up errors instead of aborting. Do that at least for bind() failures which actually happen in real live due to the tcp port being busy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit aafd8eea74acb23fc818b49824a74c4d885c3504)
* smartcard: configure option --enable-smartcardAlon Levy2010-12-071-0/+11
|
* smartcard: server side (not enabled yet)Alon Levy2010-12-073-0/+574
|
* server: add spice_server_char_device_remove_interfaceAlon Levy2010-12-071-5/+14
|
* server: print subtype when adding CHAR_DEVICE interfacesAlon Levy2010-12-061-1/+1
|
* server: add static to spice_server_char_device_add_interfaceAlon Levy2010-12-061-1/+1
|
* server: fix print text on vdagent interface additionAlon Levy2010-12-061-1/+1
|
* server: add char_device.h header, use in reds.cAlon Levy2010-12-062-4/+12
|
* spice-experimental.h: add multiple include protectionAlon Levy2010-12-061-1/+7
|
* server/vdi_port (virtserial): always read dataAlon Levy2010-12-061-6/+13
| | | | | | | | | | | | We erronously ignored data from guest on the serial channel if no client is connected. This leads to an assert when the guest writes a second time, since there is still data unconsumed by us (the host). Fix by reading data anyway, and discarding it after parsing (and reading) whole messages from the guest. Net affect is that any messages the agent sends while no client is connected get discarded, but only full messages are discarded. This fixes an abort if booting a winxp guest with vdagent without a connected client.
* server: add char_device.h to Makefile.am for make distAlon Levy2010-12-021-0/+1
|
* server/tests: add test_display_no_sslAlon Levy2010-11-304-50/+588
| | | | | | | | | | updates taken from spice vga mode updates, i.e. non cacheable, glz compressed (depends on whatever settings you apply to the server) opaque draw operations. + completed the SpiceCoreInterface implementation (timers) v1->v2: removed test_util.c (Hans) replaced mallocz with calloc (Hans)
* server/tests: Makefile.am fixesAlon Levy2010-11-301-2/+2
| | | | | * don't install tests on make install * don't forget anything for make dist tarball
* add .gitignore for testsAlon Levy2010-11-301-0/+4
|
* server/reds: zap unsetting of QEMU_AUDIO_DRVAlon Levy2010-11-081-1/+0
|
* gitignore: add generated_*, vim temps, pycAlon Levy2010-11-081-0/+3
|
* reds: remove needless buffer in InputsStateAlon Levy2010-11-081-3/+0
|
* server: tests: add basic tests with working do nothing serverAlon Levy2010-11-088-0/+293
|
* Release 0.6.30.6.3Hans de Goede2010-10-181-1/+1
|
* Bump version to 0.6.20.6.2Hans de Goede2010-10-181-1/+1
|
* server: remove useless agent send_tokensHans de Goede2010-10-161-32/+5
| | | | | | | | We are keeping track of tokens for sending agent data to the client, but the client send an initial value of ~0, and never gives us new send tokens so this is all rather useless -> remove it. Note that it is kept in the migration data struct for compatibility reasons.