qemu-e2k/chardev
zhanghailiang 8487ce45f8 char: remove the right fd been watched in qemu_chr_fe_set_handlers()
We can call qemu_chr_fe_set_handlers() to add/remove fd been watched
in 'context' which can be either default main context or other explicit
context. But the original logic is not correct, we didn't remove
the right fd because we call g_main_context_find_source_by_id(NULL, tag)
which always try to find the Gsource from default context.

Fix it by passing the right context to g_main_context_find_source_by_id().

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-03-06 11:46:02 +08:00
..
Makefile.objs char: move parallel chardev in its own file 2017-01-31 23:31:21 +04:00
char-console.c char: move console in its own file 2017-01-31 23:31:21 +04:00
char-fd.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-fd.h char: move fd chardev in its own file 2017-01-31 23:31:21 +04:00
char-file.c char: move file chardev in its own file 2017-01-31 23:31:21 +04:00
char-io.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-io.h char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-mux.c char: move mux to its own file 2017-01-31 23:31:20 +04:00
char-mux.h char: move mux to its own file 2017-01-31 23:31:20 +04:00
char-null.c char: move null chardev to its own file 2017-01-31 23:31:20 +04:00
char-parallel.c char: move parallel chardev in its own file 2017-01-31 23:31:21 +04:00
char-parallel.h char: move parallel chardev in its own file 2017-01-31 23:31:21 +04:00
char-pipe.c char: move pipe chardev in its own file 2017-01-31 23:31:21 +04:00
char-pty.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-ringbuf.c char: move ringbuf/memory to its own file 2017-01-31 23:31:20 +04:00
char-serial.c char: move serial chardev to its own file 2017-01-31 23:31:21 +04:00
char-serial.h char: move serial chardev to its own file 2017-01-31 23:31:21 +04:00
char-socket.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-stdio.c char: move stdio in its own file 2017-01-31 23:31:21 +04:00
char-udp.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00
char-win-stdio.c char: move win-stdio into its own file 2017-01-31 23:31:21 +04:00
char-win-stdio.h char: move win-stdio into its own file 2017-01-31 23:31:21 +04:00
char-win.c char: move win chardev base class in its own file 2017-01-31 23:31:21 +04:00
char-win.h char: move win chardev base class in its own file 2017-01-31 23:31:21 +04:00
char.c char: remove the right fd been watched in qemu_chr_fe_set_handlers() 2017-03-06 11:46:02 +08:00