aboutsummaryrefslogtreecommitdiff
path: root/net/colo-compare.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-22 12:53:03 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-24 15:46:10 +0200
commit39ab61c6d0757ed95badc9315857effdb64e4aa0 (patch)
tree27e481ccb19976a11abc3ee314c52f12c35868c5 /net/colo-compare.c
parent72ac876248ca2d33b3e1170b2f86fb68daaacdc8 (diff)
char: remove explicit_fe_open, use a set_handlers argument
No need to keep explicit_fe_open around if it affects only a qemu_chr_fe_set_handlers(). Use an additional argument instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-24-marcandre.lureau@redhat.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 308368164c..109990fd8e 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -451,7 +451,8 @@ 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, NULL, NULL);
+ qemu_chr_fe_set_handlers(&s->chr_pri_in, NULL, NULL, NULL,
+ NULL, NULL, true);
error_report("colo-compare primary_in error");
}
}
@@ -467,7 +468,8 @@ 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, NULL, NULL);
+ qemu_chr_fe_set_handlers(&s->chr_sec_in, NULL, NULL, NULL,
+ NULL, NULL, true);
error_report("colo-compare secondary_in error");
}
}
@@ -481,9 +483,9 @@ static void *colo_compare_thread(void *opaque)
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, worker_context);
+ compare_pri_chr_in, NULL, s, worker_context, true);
qemu_chr_fe_set_handlers(&s->chr_sec_in, compare_chr_can_read,
- compare_sec_chr_in, NULL, s, worker_context);
+ compare_sec_chr_in, NULL, s, worker_context, true);
compare_loop = g_main_loop_new(worker_context, FALSE);