summaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-17 17:15:02 +0200
committerJuan Quintela <quintela@redhat.com>2017-06-13 11:00:44 +0200
commit543147116e40edcc6ccfc51e7b05a8a8934b48b5 (patch)
treeb35e627381e294d58741f1f28fcbfca19de7dbb0 /migration
parentc8f9f4f402dabeec88d2f5e21e54a88021b2eeee (diff)
downloadqemu-543147116e40edcc6ccfc51e7b05a8a8934b48b5.zip
migration: Remove MigrationState from migration_channel_incomming()
All callers were calling migrate_get_current(), so do it inside the function. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/channel.c5
-rw-r--r--migration/channel.h3
-rw-r--r--migration/exec.c2
-rw-r--r--migration/fd.c2
-rw-r--r--migration/socket.c3
-rw-r--r--migration/tls.c2
6 files changed, 8 insertions, 9 deletions
diff --git a/migration/channel.c b/migration/channel.c
index eae1d9e28a..92f6f996a5 100644
--- a/migration/channel.c
+++ b/migration/channel.c
@@ -19,9 +19,10 @@
#include "qapi/error.h"
#include "io/channel-tls.h"
-void migration_channel_process_incoming(MigrationState *s,
- QIOChannel *ioc)
+void migration_channel_process_incoming(QIOChannel *ioc)
{
+ MigrationState *s = migrate_get_current();
+
trace_migration_set_incoming_channel(
ioc, object_get_typename(OBJECT(ioc)));
diff --git a/migration/channel.h b/migration/channel.h
index 2e0a7e33cc..e4b40579a1 100644
--- a/migration/channel.h
+++ b/migration/channel.h
@@ -18,8 +18,7 @@
#include "io/channel.h"
-void migration_channel_process_incoming(MigrationState *s,
- QIOChannel *ioc);
+void migration_channel_process_incoming(QIOChannel *ioc);
void migration_channel_connect(MigrationState *s,
QIOChannel *ioc,
diff --git a/migration/exec.c b/migration/exec.c
index 9077024286..fc78eeba69 100644
--- a/migration/exec.c
+++ b/migration/exec.c
@@ -49,7 +49,7 @@ static gboolean exec_accept_incoming_migration(QIOChannel *ioc,
GIOCondition condition,
gpointer opaque)
{
- migration_channel_process_incoming(migrate_get_current(), ioc);
+ migration_channel_process_incoming(ioc);
object_unref(OBJECT(ioc));
return FALSE; /* unregister */
}
diff --git a/migration/fd.c b/migration/fd.c
index 0077a505a3..8a04dcd38c 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -49,7 +49,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc,
GIOCondition condition,
gpointer opaque)
{
- migration_channel_process_incoming(migrate_get_current(), ioc);
+ migration_channel_process_incoming(ioc);
object_unref(OBJECT(ioc));
return FALSE; /* unregister */
}
diff --git a/migration/socket.c b/migration/socket.c
index 85bfdccae1..50dc8d8ebc 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -148,8 +148,7 @@ static gboolean socket_accept_incoming_migration(QIOChannel *ioc,
trace_migration_socket_incoming_accepted();
qio_channel_set_name(QIO_CHANNEL(sioc), "migration-socket-incoming");
- migration_channel_process_incoming(migrate_get_current(),
- QIO_CHANNEL(sioc));
+ migration_channel_process_incoming(QIO_CHANNEL(sioc));
object_unref(OBJECT(sioc));
out:
diff --git a/migration/tls.c b/migration/tls.c
index bae9acad6c..d3abd6e131 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -74,7 +74,7 @@ static void migration_tls_incoming_handshake(QIOTask *task,
error_report_err(err);
} else {
trace_migration_tls_incoming_handshake_complete();
- migration_channel_process_incoming(migrate_get_current(), ioc);
+ migration_channel_process_incoming(ioc);
}
object_unref(OBJECT(ioc));
}