[Spice-commits] 2 commits - server/red-qxl.c server/red-qxl.h server/red-worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Aug 31 16:30:58 UTC 2017
server/red-qxl.c | 4 ++--
server/red-qxl.h | 6 +++---
server/red-worker.c | 2 ++
3 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit c8bc09bcb32dc7494df06fa52d20d84f9b29a435
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Aug 31 05:02:40 2017 +0100
red-qxl: Update header guard names
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/red-qxl.h b/server/red-qxl.h
index 93cc4d0f..f925f065 100644
--- a/server/red-qxl.h
+++ b/server/red-qxl.h
@@ -15,8 +15,8 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RED_DISPATCHER_H_
-#define RED_DISPATCHER_H_
+#ifndef RED_QXL_H_
+#define RED_QXL_H_
#include "red-channel.h"
#include "spice-qxl.h"
@@ -303,4 +303,4 @@ enum {
void red_qxl_clear_pending(QXLState *qxl_state, int pending);
-#endif /* RED_DISPATCHER_H_ */
+#endif /* RED_QXL_H_ */
commit d248714439bbe0d3846d58ef27b6925a5a4f3499
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Aug 31 05:05:10 2017 +0100
red-qxl: Reference RCC pointer in migration request
The message is asynchronous so to avoid the object to potentially
been released before being processed keep a strong reference to
it.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/red-qxl.c b/server/red-qxl.c
index e145ea49..6ad8f6a5 100644
--- a/server/red-qxl.c
+++ b/server/red-qxl.c
@@ -130,7 +130,7 @@ static void red_qxl_display_migrate(RedChannelClient *rcc)
g_object_get(channel, "channel-type", &type, "id", &id, NULL);
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("channel type %u id %u", type, id);
- payload.rcc = rcc;
+ payload.rcc = g_object_ref(rcc);
dispatcher_send_message(dispatcher,
RED_WORKER_MESSAGE_DISPLAY_MIGRATE,
&payload);
@@ -187,7 +187,7 @@ static void red_qxl_cursor_migrate(RedChannelClient *rcc)
g_object_get(channel, "channel-type", &type, "id", &id, NULL);
dispatcher = (Dispatcher *)g_object_get_data(G_OBJECT(channel), "dispatcher");
spice_printerr("channel type %u id %u", type, id);
- payload.rcc = rcc;
+ payload.rcc = g_object_ref(rcc);
dispatcher_send_message(dispatcher,
RED_WORKER_MESSAGE_CURSOR_MIGRATE,
&payload);
diff --git a/server/red-worker.c b/server/red-worker.c
index 6ebe6b94..9c97f499 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -747,6 +747,7 @@ static void handle_dev_display_migrate(void *opaque, void *payload)
spice_debug("migrate display client");
spice_assert(rcc);
red_migrate_display(worker->display_channel, rcc);
+ g_object_unref(rcc);
}
static inline uint32_t qxl_monitors_config_size(uint32_t heads)
@@ -828,6 +829,7 @@ static void handle_dev_cursor_migrate(void *opaque, void *payload)
spice_debug("migrate cursor client");
cursor_channel_client_migrate(rcc);
+ g_object_unref(rcc);
}
static void handle_dev_set_compression(void *opaque, void *payload)
More information about the Spice-commits
mailing list