[PATCH spice-gtk V5 3/3] file-xfer: disable file-xfer when agent is not connected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Dunrong Huang <riegamaths@xxxxxxxxx>
---
 gtk/channel-main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index e23d67d..5221b0a 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -2712,10 +2712,14 @@ void spice_main_file_copy_async(SpiceMainChannel *channel,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data)
 {
+    SpiceMainChannelPrivate *c = channel->priv;
+
     g_return_if_fail(channel != NULL);
     g_return_if_fail(SPICE_IS_MAIN_CHANNEL(channel));
     g_return_if_fail(sources != NULL && sources[0] != NULL);
 
+    g_return_if_fail(c->agent_connected);
+
     /* At the moment, the copy() method is limited to a single file,
        support for copying multi-files will be implemented later. */
     g_return_if_fail(sources[1] == NULL);
-- 
1.8.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]