aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-10-05 17:58:44 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-10-09 07:08:19 +0200
commit947e47448dcc4e4d7a8b7c42b43acb3435b3ad35 (patch)
tree855a18a7da785ee7dff7919ec9a02be34c6ff51c /migration
parent87e6f4a4d6885006931b371771e2933c40700427 (diff)
monitor: Use getter/setter functions for cur_mon
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-4-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/fd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/fd.c b/migration/fd.c
index 0a29ecdebf..6f2f50475f 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -26,7 +26,7 @@
void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **errp)
{
QIOChannel *ioc;
- int fd = monitor_get_fd(cur_mon, fdname, errp);
+ int fd = monitor_get_fd(monitor_cur(), fdname, errp);
if (fd == -1) {
return;
}
@@ -55,7 +55,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc,
void fd_start_incoming_migration(const char *fdname, Error **errp)
{
QIOChannel *ioc;
- int fd = monitor_fd_param(cur_mon, fdname, errp);
+ int fd = monitor_fd_param(monitor_cur(), fdname, errp);
if (fd == -1) {
return;
}