mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
72ac876248
commit
39ab61c6d0
44 changed files with 67 additions and 60 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue