summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chardev/char-fe.c4
-rw-r--r--chardev/char-mux.c5
-rw-r--r--include/chardev/char-mux.h1
3 files changed, 3 insertions, 7 deletions
diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index b7bcbd59c0..f3530a90e6 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -290,10 +290,6 @@ void qemu_chr_fe_set_handlers_full(CharBackend *b,
qemu_chr_be_event(s, CHR_EVENT_OPENED);
}
}
-
- if (CHARDEV_IS_MUX(s)) {
- mux_chr_set_handlers(s, context);
- }
}
void qemu_chr_fe_set_handlers(CharBackend *b,
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 1199d32674..23aa82125d 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -278,7 +278,7 @@ static void char_mux_finalize(Object *obj)
qemu_chr_fe_deinit(&d->chr, false);
}
-void mux_chr_set_handlers(Chardev *chr, GMainContext *context)
+static void mux_chr_update_read_handlers(Chardev *chr)
{
MuxChardev *d = MUX_CHARDEV(chr);
@@ -289,7 +289,7 @@ void mux_chr_set_handlers(Chardev *chr, GMainContext *context)
mux_chr_event,
NULL,
chr,
- context, true, false);
+ chr->gcontext, true, false);
}
void mux_set_focus(Chardev *chr, int focus)
@@ -383,6 +383,7 @@ static void char_mux_class_init(ObjectClass *oc, void *data)
cc->chr_add_watch = mux_chr_add_watch;
cc->chr_be_event = mux_chr_be_event;
cc->chr_machine_done = open_muxes;
+ cc->chr_update_read_handler = mux_chr_update_read_handlers;
}
static const TypeInfo char_mux_type_info = {
diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h
index 1e13187767..572cefd517 100644
--- a/include/chardev/char-mux.h
+++ b/include/chardev/char-mux.h
@@ -55,7 +55,6 @@ typedef struct MuxChardev {
#define CHARDEV_IS_MUX(chr) \
object_dynamic_cast(OBJECT(chr), TYPE_CHARDEV_MUX)
-void mux_chr_set_handlers(Chardev *chr, GMainContext *context);
void mux_set_focus(Chardev *chr, int focus);
void mux_chr_send_all_event(Chardev *chr, int event);