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

Dunrong Huang riegamaths at gmail.com
Fri Dec 28 05:33:54 PST 2012


Signed-off-by: Dunrong Huang <riegamaths at gmail.com>
---
 gtk/channel-main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index b1496bd..b045c3a 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -2701,11 +2701,14 @@ void spice_main_file_copy_async(SpiceMainChannel *channel,
 {
     int i = 0;
     static uint32_t xfer_group_id;
+    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);
 
+    g_return_if_fail(c->agent_connected);
+
     xfer_group_id++;
     xfer_group_id = (xfer_group_id > UINT32_MAX) ? 0 : xfer_group_id;
     while (sources[i]) {
-- 
1.8.0



More information about the Spice-devel mailing list