spice/server
Yonit Halperin 47e722b85c red_channel: prevent adding and pushing pipe items after a channel_client has diconnected
Fixes: leaks of pipe items & "red_client_destroy: assertion `rcc->send_data.size == 0'"

red_channel_disconnect clears the pipe. It is called only once. After,
it was called, not items should be added to the pipe.

An example of when this assert can occur:
on_new_cursor_channel (red_worker.c), pushes 2 pipe items.
When it pushes the first pipe item, if the client has disconnected,
it can hit a socket error, and then, red_channel_client_disconnect is called.
The second call to adding a pipe item, will add the item to
the pipe. red_channel_client_pipe_add_type also calls
red_channel_client_push, which will update the send_data.size.
Then, the push will also hit a socket error, but red_channel_client_disconnect
won't clear the pending pipe item again, since it was already called.
When red_client_destory is called, we hit assertion `rcc->send_data.size
== 0'.
Note that if a pipe item is added to the pipe after
red_channel_client_disconnect was called, but without pushing it,
we should hit "spice_assert(rcc->pipe_size == 0)".
2013-07-29 11:35:16 -04:00
..
tests syntax-check: make sure config.h is the first included .h file 2013-07-16 23:37:29 +03:00
.gitignore gitignore: add generated_*, vim temps, pyc 2010-11-08 16:06:55 +02:00
agent-msg-filter.c server: Add support for filtering out agent file-xfer msgs (rhbz#961848) 2013-06-06 16:07:30 +02:00
agent-msg-filter.h server: Add support for filtering out agent file-xfer msgs (rhbz#961848) 2013-06-06 16:07:30 +02:00
char_device.c syntax-check: remove trailing whitespaces 2013-07-16 23:37:29 +03:00
char_device.h syntax-check: s/the the/the/ in a comment 2013-07-16 23:37:28 +03:00
demarshallers.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
dispatcher.c Don't do arithmetic on void * type, use uint8_t instead 2012-04-25 09:40:18 +01:00
dispatcher.h dispatcher.h: fix - s/#define MAIN_DISPATCHER_H/#define DISPATCHER_H 2013-04-22 16:30:54 -04:00
glz_encode_match_tmpl.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
glz_encode_tmpl.c Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
glz_encoder_config.h Fix multiple printf format problems 2012-04-25 09:42:11 +01:00
glz_encoder_dictionary_protected.h server: s/max_encdoers/max_encoders/ 2012-08-30 17:08:09 +03:00
glz_encoder_dictionary.c server: s/max_encdoers/max_encoders/ 2012-08-30 17:08:09 +03:00
glz_encoder_dictionary.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder.c Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
inputs_channel.c red_channel: monitor connection latency using MSG_PING 2013-04-22 16:30:54 -04:00
inputs_channel.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
jpeg_encoder.c Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
jpeg_encoder.h Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
main_channel.c main_channel: fix double release of migration target data 2013-05-23 16:59:04 -04:00
main_channel.h main_channel: add routine for checking if a network test had been conducted and completed 2013-05-08 09:39:46 -04:00
main_dispatcher.c server/dispatchers: initialize stack to 0 for valgrind 2013-05-17 11:06:34 -04:00
main_dispatcher.h reds: support mm_time latency adjustments 2013-04-22 16:30:55 -04:00
Makefile.am syntax-check: use test A && test B instead of test A -a B 2013-07-16 23:37:29 +03:00
migration_protocol.h enable seamless migration and set migration protocol version 2012-08-27 09:13:14 +03:00
mjpeg_encoder.c red_worker: improve stream stats readability and ease of parsing 2013-06-24 15:23:34 -04:00
mjpeg_encoder.h mjpeg_encoder: add mjpeg_encoder_get_stats 2013-06-24 15:23:34 -04:00
red_bitmap_utils.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
red_channel.c red_channel: prevent adding and pushing pipe items after a channel_client has diconnected 2013-07-29 11:35:16 -04:00
red_channel.h red_channel: add spice_channel_client_error 2013-05-08 11:18:44 -04:00
red_client_cache.h Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
red_client_shared_cache.h Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
red_common.h server/red_parse_qxl: add bitmap consistency check 2012-09-03 19:27:22 +03:00
red_dispatcher.c server/dispatchers: initialize stack to 0 for valgrind 2013-05-17 11:06:34 -04:00
red_dispatcher.h server/red_dispatcher: close pa hole in RedWorkerMessageDisplayConnect for valgrind 2013-05-17 11:06:34 -04:00
red_memslots.c Add support for QXLComposite to spice server 2012-08-24 13:44:42 -04:00
red_memslots.h server: allow failure in getvirt 2012-04-05 18:28:49 +03:00
red_parse_qxl.c syntax-check: remove trailing whitespaces 2013-07-16 23:37:29 +03:00
red_parse_qxl.h Add support for QXLComposite to spice server 2012-08-24 13:44:42 -04:00
red_tunnel_worker.c server/red_tunnel_worker: remove unneeded expect_migrate_mark 2012-08-30 17:08:09 +03:00
red_tunnel_worker.h server: Unset executable bit of red_tunnel_worker.h 2011-05-05 20:04:49 +03:00
red_worker.c server/red_worker.c: remove unused pipe_item_remove 2013-07-24 14:56:54 +03:00
red_worker.h server: Add public spice_qxl_driver_unload method 2013-04-24 09:31:27 +02:00
reds_gl_canvas.c Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_gl_canvas.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_sw_canvas.c Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_sw_canvas.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds-private.h reds: support mm_time latency adjustments 2013-04-22 16:30:55 -04:00
reds.c syntax-check: s/the the/the/ in a comment 2013-07-16 23:37:28 +03:00
reds.h reds: move handle_channel_event logic from main_dispatcher to reds 2013-05-08 11:26:57 -04:00
smartcard.c red_channel: monitor connection latency using MSG_PING 2013-04-22 16:30:54 -04:00
smartcard.h smartcard: use SpiceCharDeviceState for managing reading from the device 2012-07-03 14:13:42 +03:00
snd_worker.c snd_worker: support sending SPICE_MSG_PLAYBACK_LATENCY 2013-04-22 16:30:54 -04:00
snd_worker.h snd_worker: support sending SPICE_MSG_PLAYBACK_LATENCY 2013-04-22 16:30:54 -04:00
spice_timer_queue.c syntax-check: make sure config.h is the first included .h file 2013-07-16 23:37:29 +03:00
spice_timer_queue.h server: spice_timer_queue 2013-04-22 16:30:54 -04:00
spice-experimental.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
spice-server.syms server: Add support for filtering out agent file-xfer msgs (rhbz#961848) 2013-06-06 16:07:30 +02:00
spice.h server: Add support for filtering out agent file-xfer msgs (rhbz#961848) 2013-06-06 16:07:30 +02:00
spicevmc.c red_channel: monitor connection latency using MSG_PING 2013-04-22 16:30:54 -04:00
stat.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
zlib_encoder.c Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
zlib_encoder.h applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00