spice/server
Frediano Ziglio b2fa6ec66c red-channel-client: Avoid weird memory references using MarkerPipeItem
Instead of having MarkerPipeItem pointing to an external variable with
the possibility to forget to reset it and have a dangling pointer, this
commit takes a reference on the item to keep it alive after it was sent.
This item is placed into the queue to understand when it was sent. The
current implementation detects the unqueue when the item is destroyed so
we currently store a pointer to an external variable in the item, this
way we can use a variable which will still be alive after the item is
released/destroyed.
This change updates the variable (stored in the item) when we try to
send the item, rather than at destruction time. The destruction happened
at the end of red_channel_client_send_item(), so we don't mark
item_in_pipe much earlier than before.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2017-11-29 16:49:24 +00:00
..
tests test-stream-device: Check incomplete reads of StreamMsgFormat 2017-11-27 21:38:02 +00:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Fix minor inconsistencies with declaration and definition 2017-02-16 10:28:52 +00:00
agent-msg-filter.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.h Unify header guards 2017-03-30 18:17:20 +01:00
cache-item.tmpl.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
char-device.c char-device: Do not stop and clear interface on reset 2017-10-16 19:59:14 +01:00
char-device.h stream-device: Add device to handle streaming 2017-10-16 19:59:14 +01:00
common-graphics-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
common-graphics-channel.h common-graphics-channel: Move "qxl" property to DisplayChannel 2017-09-07 06:42:01 +01:00
cursor-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
cursor-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
dcc-private.h Unify header guards 2017-03-30 18:17:20 +01:00
dcc-send.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
dcc.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
dcc.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
demarshallers.h Unify header guards 2017-03-30 18:17:20 +01:00
dispatcher.c Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
dispatcher.h Add documentation for Dispatcher 2017-09-07 11:12:45 -05:00
display-channel-private.h common-graphics-channel: Move "qxl" property to DisplayChannel 2017-09-07 06:42:01 +01:00
display-channel.c Use constant variables for image operations 2017-11-08 15:23:49 +00:00
display-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
display-limits.h Unify header guards 2017-03-30 18:17:20 +01:00
event-loop.c event-loop: Use GLib memory functions 2017-10-11 12:52:17 +01:00
glib-compat.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c Fix -Werror=format with DEBUG_ENCODE 2016-07-01 14:00:37 +02:00
glz-encoder-dict.c Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-dict.h Make various functions static 2017-04-05 12:39:20 +02:00
glz-encoder-priv.h Unify header guards 2017-03-30 18:17:20 +01:00
glz-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
gstreamer-encoder.c gstreamer-encoder: Use GLib memory functions 2017-10-11 12:52:17 +01:00
image-cache.c Use constant variables for image operations 2017-11-08 15:23:49 +00:00
image-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
image-encoders.c image-encoders: Use GLib memory functions 2017-09-19 16:17:10 +01:00
image-encoders.h Unify header guards 2017-03-30 18:17:20 +01:00
inputs-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
inputs-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
inputs-channel.c inputs-channel: Remove reds argument from inputs_channel_set_tablet 2017-11-27 10:11:53 +00:00
inputs-channel.h inputs-channel: Remove reds argument from inputs_channel_set_tablet 2017-11-27 10:11:53 +00:00
jpeg-encoder.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
jpeg-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
lz4-encoder.c lz4-encoder: Use GLib memory functions 2017-10-11 12:52:12 +01:00
lz4-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
main-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-channel.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
main-dispatcher.c MainDispatcher: use correct argument type 2017-09-07 10:22:15 -05:00
main-dispatcher.h Unify header guards 2017-03-30 18:17:20 +01:00
Makefile.am Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
memslot.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
memslot.h Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
migration-protocol.h Unify header guards 2017-03-30 18:17:20 +01:00
mjpeg-encoder.c mjpeg-encoder: Fix some typos 2017-11-29 11:17:21 +00:00
net-utils.c build-sys: Add configure check for TCP_KEEPIDLE 2017-03-31 12:22:52 +02:00
net-utils.h reds-stream: Introduce reds_stream_get_no_delay() helper 2017-03-31 12:22:52 +02:00
pixmap-cache.c pixmap-cache: Use GLib memory functions 2017-10-11 12:52:17 +01:00
pixmap-cache.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-capabilities.c Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
red-channel-capabilities.h Unify header guards 2017-03-30 18:17:20 +01:00
red-channel-client.c red-channel-client: Avoid weird memory references using MarkerPipeItem 2017-11-29 16:49:24 +00:00
red-channel-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-channel.c channel: Introduce logging helpers 2017-10-23 20:29:31 +01:00
red-channel.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-client.c red-client: Prevent RedChannelClient creation when the RedClient is being destroyed 2017-08-31 18:05:26 +01:00
red-client.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
red-common.h Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
red-parse-qxl.c parse-qxl: Use GLib memory functions 2017-10-11 12:52:17 +01:00
red-parse-qxl.h red-parse-qxl: Change int/1/0 to bool/true/false 2017-05-02 11:30:43 +02:00
red-pipe-item.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
red-pipe-item.h Unify header guards 2017-03-30 18:17:20 +01:00
red-qxl.c channel: Introduce logging helpers 2017-10-23 20:29:31 +01:00
red-qxl.h gl: fix client mouse mode 2017-10-04 10:57:39 +01:00
red-record-qxl.c log: Do not print function name twice during logging 2017-06-18 09:53:27 +01:00
red-record-qxl.h Unify header guards 2017-03-30 18:17:20 +01:00
red-replay-qxl.c replay-qxl: Use GLib memory functions 2017-10-11 12:52:17 +01:00
red-stream.c red-stream: fix build without SASL 2017-11-27 10:13:11 +00:00
red-stream.h Remove common/mem.h includes 2017-11-21 08:27:09 +00:00
red-worker.c red-qxl: Remove surface_create field 2017-10-17 21:56:20 +01:00
red-worker.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
reds-private.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
reds.c inputs-channel: Remove reds argument from inputs_channel_set_tablet 2017-11-27 10:11:53 +00:00
reds.h reds: Remove leak allocating migration state 2017-10-13 17:10:53 +01:00
smartcard-channel-client.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
smartcard-channel-client.h Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
smartcard.c Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
smartcard.h Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
sound.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
sound.h Change playback_compression to bool type 2017-04-07 15:08:43 -05:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Attempt to create bitmap debug directory 2017-04-07 16:45:54 +01:00
spice-bitmap-utils.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-experimental.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h spice-qxl: Add version information 2017-09-07 16:13:49 +01:00
spice-replay.h Unify header guards 2017-03-30 18:17:20 +01:00
spice-server-enums.tmpl.c syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server-enums.tmpl.h syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c Reuse SPICE_DECLARE_TYPE macro 2017-11-21 08:38:44 +00:00
stat-file.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
stat-file.h Unify header guards 2017-03-30 18:17:20 +01:00
stat.h Unify header guards 2017-03-30 18:17:20 +01:00
stream-channel.c Use standard "Red" namespace 2017-10-21 08:47:02 +01:00
stream-channel.h Make stream-channel.h self-contained 2017-10-30 12:01:24 +01:00
stream-device.c StreamDevice: Handle incomplete reads of StreamMsgFormat 2017-11-27 21:37:53 +00:00
stream.c red-pipe-item: Use GLib memory functions 2017-10-11 12:52:17 +01:00
stream.h Unify header guards 2017-03-30 18:17:20 +01:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c tree: Use GLib memory functions 2017-10-11 12:52:17 +01:00
tree.h Unify header guards 2017-03-30 18:17:20 +01:00
utils.c utils: Check we list all channel names 2017-11-09 10:58:13 +00:00
utils.h utils: Introduce helpers to map channel types to names 2017-10-23 20:29:28 +01:00
video-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00
zlib-encoder.c Start using GLib memory allocation 2017-09-19 16:17:10 +01:00
zlib-encoder.h Unify header guards 2017-03-30 18:17:20 +01:00