]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
migration: Teach it about G_SOURCE_REMOVE
authorJuan Quintela <quintela@redhat.com>
Mon, 24 Jul 2017 10:51:59 +0000 (12:51 +0200)
committerJuan Quintela <quintela@redhat.com>
Fri, 22 Sep 2017 12:11:18 +0000 (14:11 +0200)
As this is defined on glib 2.32, add compatibility macros for older glibs.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
include/glib-compat.h
migration/exec.c
migration/fd.c
migration/socket.c

index fcffcd3f0774260d519bb97d95435ac3d385f05f..e15aca2d403db1f83e77a36d2d9de1a99df70f5c 100644 (file)
@@ -223,6 +223,8 @@ static inline gboolean g_hash_table_contains(GHashTable *hash_table,
 {
     return g_hash_table_lookup_extended(hash_table, key, NULL, NULL);
 }
+#define G_SOURCE_CONTINUE TRUE
+#define G_SOURCE_REMOVE FALSE
 #endif
 
 #ifndef g_assert_true
index 08b599e0e2420897a4ff4dd7d243472a890f8396..f3be1baf2e7259bb22748b349867e885c9cbbe71 100644 (file)
@@ -49,7 +49,7 @@ static gboolean exec_accept_incoming_migration(QIOChannel *ioc,
 {
     migration_channel_process_incoming(ioc);
     object_unref(OBJECT(ioc));
-    return FALSE; /* unregister */
+    return G_SOURCE_REMOVE;
 }
 
 void exec_start_incoming_migration(const char *command, Error **errp)
index 30f5258a6a99b428399b472de480678c349016ae..30de4b9847a4346cd249685489fa8906681b1734 100644 (file)
@@ -49,7 +49,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc,
 {
     migration_channel_process_incoming(ioc);
     object_unref(OBJECT(ioc));
-    return FALSE; /* unregister */
+    return G_SOURCE_REMOVE;
 }
 
 void fd_start_incoming_migration(const char *infd, Error **errp)
index 757d3821a1f9ec6a57c61269c6f2042e62441812..b02d37d7a35ae8b22db4852b8c93a039e4e70e26 100644 (file)
@@ -154,7 +154,7 @@ static gboolean socket_accept_incoming_migration(QIOChannel *ioc,
 out:
     /* Close listening socket as its no longer needed */
     qio_channel_close(ioc, NULL);
-    return FALSE; /* unregister */
+    return G_SOURCE_REMOVE;
 }