diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-02-14 14:34:32 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-02-14 14:34:32 +0000 |
| commit | c4c5f6573a93dfbd351c41a27ea29a662d7445fa (patch) | |
| tree | c4fd3d30fd6025ac4bec8a6c245ab5d57849c596 /chardev/char-mux.c | |
| parent | 4856c2c70c87d7a76c8ea208e7568f5637e78840 (diff) | |
| parent | f7ea2038bea04628eaa55156fc34edf9d0c4a2bb (diff) | |
| download | focaccia-qemu-c4c5f6573a93dfbd351c41a27ea29a662d7445fa.tar.gz focaccia-qemu-c4c5f6573a93dfbd351c41a27ea29a662d7445fa.zip | |
Merge remote-tracking branch 'remotes/elmarco/tags/chardev-pull-request' into staging
Chardev fixes # gpg: Signature made Wed 13 Feb 2019 16:18:36 GMT # gpg: using RSA key DAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/chardev-pull-request: (25 commits) char-pty: remove write_lock usage char-pty: remove the check for connection on write chardev: add a note about frontend sources and context switch terminal3270: do not use backend timer sources char: update the mux handlers in class callback chardev/wctablet: Fix a typo char: allow specifying a GMainContext at opening time chardev: ensure termios is fully initialized tests: expand coverage of socket chardev test chardev: fix race with client connections in tcp_chr_wait_connected chardev: disallow TLS/telnet/websocket with tcp_chr_wait_connected chardev: honour the reconnect setting in tcp_chr_wait_connected chardev: use a state machine for socket connection state chardev: split up qmp_chardev_open_socket connection code chardev: split tcp_chr_wait_connected into two methods chardev: remove unused 'sioc' variable & cleanup paths chardev: ensure qemu_chr_parse_compat reports missing driver error chardev: remove many local variables in qemu_chr_parse_socket chardev: forbid 'wait' option with client sockets chardev: forbid 'reconnect' option with server sockets ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'chardev/char-mux.c')
| -rw-r--r-- | chardev/char-mux.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chardev/char-mux.c b/chardev/char-mux.c index 6055e76293..23aa82125d 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -278,18 +278,18 @@ 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); /* Fix up the real driver with mux routines */ - qemu_chr_fe_set_handlers(&d->chr, - mux_chr_can_read, - mux_chr_read, - mux_chr_event, - NULL, - chr, - context, true); + qemu_chr_fe_set_handlers_full(&d->chr, + mux_chr_can_read, + mux_chr_read, + mux_chr_event, + NULL, + chr, + chr->gcontext, true, false); } void mux_set_focus(Chardev *chr, int focus) @@ -367,7 +367,7 @@ static int open_muxes(Chardev *chr) * mark mux as OPENED so any new FEs will immediately receive * OPENED event */ - qemu_chr_be_event(chr, CHR_EVENT_OPENED); + chr->be_open = 1; return 0; } @@ -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 = { |