qemu-e2k/ui
Vladimir Sementsov-Ogievskiy 2e572baf65 ui/vnc-clipboard: fix adding notifier twice
vnc_server_cut_text_caps() is not guaranteed to be called only once.

If it called twice, we finally call notifier_list_add() twice with same
element. Which leads to loopback QLIST. So, on next
notifier_list_notify() we'll loop forever and QEMU stuck.

So, let's only register new notifier if it's not yet registered.

Note, that similar check is used in vdagent_chr_recv_caps() (before
call qemu_clipboard_peer_register()), and also before
qemu_clipboard_peer_unregister() call in vdagent_disconnect() and in
vnc_disconnect_finish().

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211110103800.2266729-1-vsementsov@virtuozzo.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-11-22 11:14:28 +01:00
..
icons
keycodemapdb@d21009b1c9
shader
clipboard.c
cocoa.m
console-gl.c
console.c
curses_keys.h
curses.c meson.build: Support ncurses on MacOS and OpenBSD 2021-11-19 10:18:27 +01:00
cursor_hidden.xpm
cursor_left_ptr.xpm
cursor.c
egl-context.c
egl-headless.c
egl-helpers.c
gtk-clipboard.c
gtk-egl.c
gtk-gl-area.c ui: fix incorrect scaling on highdpi with gtk/opengl 2021-11-22 11:13:12 +01:00
gtk.c ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd 2021-11-22 11:14:28 +01:00
input-barrier.c
input-barrier.h
input-keymap.c
input-legacy.c
input-linux.c
input.c
kbd-state.c
keymaps.c
keymaps.h
meson.build
qemu-pixman.c
qemu-x509.h
qemu.desktop
sdl2-2d.c
sdl2-gl.c
sdl2-input.c
sdl2.c
shader.c
spice-app.c
spice-core.c
spice-display.c
spice-input.c
spice-module.c
trace-events
trace.h
udmabuf.c
vdagent.c
vgafont.h
vnc_keysym.h
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-clipboard.c ui/vnc-clipboard: fix adding notifier twice 2021-11-22 11:14:28 +01:00
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c
vnc-ws.c
vnc-ws.h
vnc.c
vnc.h
win32-kbd-hook.c
x_keymap.c
x_keymap.h