aboutsummaryrefslogtreecommitdiff
path: root/net/colo-compare.c
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2017-07-06 15:08:49 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-14 11:04:33 +0200
commit81517ba37a6cec59f92396b4722861868eb0a500 (patch)
treedebc47fba5f9718bc490176419076212e7dc1b57 /net/colo-compare.c
parent313e45b5fe45542602bfa801db7a13d485c29b04 (diff)
downloadqemu-81517ba37a6cec59f92396b4722861868eb0a500.zip
qemu-81517ba37a6cec59f92396b4722861868eb0a500.tar.gz
qemu-81517ba37a6cec59f92396b4722861868eb0a500.tar.bz2
char: add backend hotswap handler
Frontends should have an interface to setup the handler of a backend change. The interface will be used in the next commits Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1499342940-56739-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'net/colo-compare.c')
-rw-r--r--net/colo-compare.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 6d500e1..abfc23c 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -543,7 +543,7 @@ static void compare_pri_chr_in(void *opaque, const uint8_t *buf, int size)
ret = net_fill_rstate(&s->pri_rs, buf, size);
if (ret == -1) {
- qemu_chr_fe_set_handlers(&s->chr_pri_in, NULL, NULL, NULL,
+ qemu_chr_fe_set_handlers(&s->chr_pri_in, NULL, NULL, NULL, NULL,
NULL, NULL, true);
error_report("colo-compare primary_in error");
}
@@ -560,7 +560,7 @@ static void compare_sec_chr_in(void *opaque, const uint8_t *buf, int size)
ret = net_fill_rstate(&s->sec_rs, buf, size);
if (ret == -1) {
- qemu_chr_fe_set_handlers(&s->chr_sec_in, NULL, NULL, NULL,
+ qemu_chr_fe_set_handlers(&s->chr_sec_in, NULL, NULL, NULL, NULL,
NULL, NULL, true);
error_report("colo-compare secondary_in error");
}
@@ -588,9 +588,11 @@ static void *colo_compare_thread(void *opaque)
s->worker_context = g_main_context_new();
qemu_chr_fe_set_handlers(&s->chr_pri_in, compare_chr_can_read,
- compare_pri_chr_in, NULL, s, s->worker_context, true);
+ compare_pri_chr_in, NULL, NULL,
+ s, s->worker_context, true);
qemu_chr_fe_set_handlers(&s->chr_sec_in, compare_chr_can_read,
- compare_sec_chr_in, NULL, s, s->worker_context, true);
+ compare_sec_chr_in, NULL, NULL,
+ s, s->worker_context, true);
s->compare_loop = g_main_loop_new(s->worker_context, FALSE);