spice/server
Hans de Goede 63e1514ccb red_worker: Remove ref counting from the EventListener struct
The red_worker EventListener struct is either embedded in one of:
1) DisplayChannelClient
2) CursorChannelClient
3) RedWorker

And as such gets destroyed when these get destroyed, in case 1 & 2 through
a call to red_channel_client_destroy().

So free-ing it when the ref-count becomes 0 is wrong, for cases:
1) and 2) this will lead to a double free;
3) this will lead to passing memory to free which was not returned by malloc.

This is not causing any issues as the ref-count never gets decremented, other
then in red_worker_main where it gets incremented before it gets decremented,
so it never becomes 0.

So we might just as well completely remove it.

Notes:
1) This is mainly a preparation patch for fixing issues introduced by
   the move from epoll to poll
2) Since removing the ref-counting removes the one code path where listeners
   would get set to NULL, this patch moves the setting of NULL to
   pre_disconnect, where it should have been done in the first place since
   red_client_destroy calls red_channel_client_disconnect
   (through the dispatcher) followed by red_channel_client_destroy, so
   after pre_disconnect the listener may be gone.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-10 13:56:29 +01:00
..
tests build-sys: fix make distcheck 2012-03-01 16:24:10 +01:00
.gitignore gitignore: add generated_*, vim temps, pyc 2010-11-08 16:06:55 +02:00
agent-msg-filter.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
agent-msg-filter.h server: add discard all option to agent message filter 2011-04-04 11:30:30 +02:00
char_device.h Rename usbredir channel code to spicevmc 2011-08-25 14:04:27 +02:00
demarshallers.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
dispatcher.c Remove extra '\n' from red_printf() calls 2012-02-14 18:19:29 +02:00
dispatcher.h server/dispatcher: add dispatcher_register_async_done_callback 2011-11-08 16:22:21 +02: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 Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder_dictionary_protected.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder_dictionary.c Remove trailing blank lines 2012-01-13 18:11:59 +02: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 Remove trailing blank lines 2012-01-13 18:11:59 +02:00
inputs_channel.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
inputs_channel.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
jpeg_encoder.c Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
jpeg_encoder.h Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
main_channel.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
main_channel.h Send name & uuid to capable clients 2012-03-05 18:19:07 +01:00
main_dispatcher.c server, separate SpiceChannelEventInfo from RedStream 2012-02-15 15:04:04 +02:00
main_dispatcher.h [0.8 branch] server: add main_dispatcher 2011-10-31 17:35:54 +02:00
Makefile.am Add configure-time check for -Wl, --version-script option 2012-02-21 10:20:44 +02:00
mjpeg_encoder.c Remove useless if() before free() 2012-01-13 18:11:58 +02:00
mjpeg_encoder.h mjpeg_encoder: remove unused functions 2011-07-22 16:53:56 +02:00
red_bitmap_utils.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
red_channel.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
red_channel.h Use standard IOV_MAX definition where applicable 2012-02-21 10:20:47 +02:00
red_client_cache.h server/red_worker: multiple client support - base split 2011-08-23 18:01:04 +03:00
red_client_shared_cache.h Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
red_common.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
red_dispatcher.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
red_dispatcher.h server/red_worker: pass remote caps to display/cursor red_channel_client's 2012-01-12 16:17:01 +02:00
red_memslots.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
red_memslots.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
red_parse_qxl.c Remove trailing blank lines 2012-01-13 18:11:59 +02:00
red_parse_qxl.h server/red_parse_qxl.h: License should be LGPLv2+ rather then GPLv2+ 2011-12-15 13:12:31 +01:00
red_tunnel_worker.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01: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 red_worker: Remove ref counting from the EventListener struct 2012-03-10 13:56:29 +01:00
red_worker.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
reds_gl_canvas.c common,server: use ASSERT from spice_common.h 2011-05-03 14:44:11 +02:00
reds_gl_canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
reds_sw_canvas.c common,server: use ASSERT from spice_common.h 2011-05-03 14:44:11 +02:00
reds_sw_canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
reds.c Send name & uuid to capable clients 2012-03-05 18:19:07 +01:00
reds.h Send name & uuid to capable clients 2012-03-05 18:19:07 +01:00
smartcard.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
smartcard.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
snd_worker.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
snd_worker.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
spice-experimental.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
spice-server.syms Send name & uuid to capable clients 2012-03-05 18:19:07 +01:00
spice.h Send name & uuid to capable clients 2012-03-05 18:19:07 +01:00
spicevmc.c Ensure all members of ChannelCbs and ClientCbs are either assigned or NULL 2012-03-10 11:51:54 +01:00
stat.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
zlib_encoder.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
zlib_encoder.h applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00