[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/41] migration: Remove MigrationState from migrati
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 03/41] migration: Remove MigrationState from migration_channel_incomming() |
Date: |
Wed, 26 Apr 2017 00:04:13 +0200 |
All callers were calling migrate_get_current(), so do it inside the function.
Signed-off-by: Juan Quintela <address@hidden>
---
migration/channel.c | 5 +++--
migration/channel.h | 3 +--
migration/exec.c | 2 +-
migration/fd.c | 2 +-
migration/socket.c | 3 +--
migration/tls.c | 2 +-
6 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/migration/channel.c b/migration/channel.c
index 6104de5..acb4dd6 100644
--- a/migration/channel.c
+++ b/migration/channel.c
@@ -20,9 +20,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 618acb7..fbc4bfb 100644
--- a/migration/channel.h
+++ b/migration/channel.h
@@ -16,8 +16,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 203f587..405d0ab 100644
--- a/migration/exec.c
+++ b/migration/exec.c
@@ -48,7 +48,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 05e0a5c..ccaa806 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -48,7 +48,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 99bd7e7..a49cf44 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -149,8 +149,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 34ad121..b4cb8fe 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -73,7 +73,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));
}
--
2.9.3
- [Qemu-devel] [PATCH 00/41] Migration cleanup, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 03/41] migration: Remove MigrationState from migration_channel_incomming(),
Juan Quintela <=
- [Qemu-devel] [PATCH 01/41] migration: Create migration/blocker.h, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 02/41] migration: Split migration/channel.c for channel operations, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 04/41] migration: Export qemu-file-channel.c functions in its own file, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 06/41] migration: Move colo.h to migration/, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 07/41] migration: Move failover.h to migration/colo-failover.h, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 05/41] migration: Remove migration.h from colo.h, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 08/41] migration: Move page_cache.c to migration/, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 09/41] migration: Move qjson.h to migration/, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 10/41] migration: Move postcopy-ram.h to migration/, Juan Quintela, 2017/04/25