[virt-tools-list] [PATCH virt-viewer 12/19] Prevent from adding the same display several time in the session
Christophe Fergeau
cfergeau at redhat.com
Tue Jul 17 09:43:19 UTC 2012
How can this happen?
Christophe
On Mon, Jul 16, 2012 at 06:57:47PM +0200, Marc-André Lureau wrote:
> ---
> src/virt-viewer-session.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c
> index 18b6922..9249a1f 100644
> --- a/src/virt-viewer-session.c
> +++ b/src/virt-viewer-session.c
> @@ -282,6 +282,9 @@ virt_viewer_session_new(void)
> void virt_viewer_session_add_display(VirtViewerSession *session,
> VirtViewerDisplay *display)
> {
> + if (g_list_find(session->priv->displays, display))
> + return;
> +
> session->priv->displays = g_list_append(session->priv->displays, display);
> g_object_ref(display);
> g_signal_emit_by_name(session, "session-display-added", display);
> --
> 1.7.10.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20120717/75f071a3/attachment.sig>
More information about the virt-tools-list
mailing list