[Spice-devel] [PATCH spice-gtk v2] main: Handle file-xfer detailed errors
Jakub Janků
janku.jakub.jj at gmail.com
Mon May 29 14:26:20 UTC 2017
Log appropriate error messages when we receive
VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
VD_AGENT_FILE_XFER_STATUS_AGENT_NOT_CONNECTED,
VD_AGENT_FILE_XFER_STATUS_DISABLED.
---
src/channel-main.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/channel-main.c b/src/channel-main.c
index af1350c..4d6c416 100644
--- a/src/channel-main.c
+++ b/src/channel-main.c
@@ -1882,6 +1882,19 @@ static void main_agent_handle_xfer_status(SpiceMainChannel *channel,
g_free(file_size_str);
break;
}
+ case VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED:
+ error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
+ _("User's session is locked and cannot transfer files, "
+ "unlock it and try again."));
+ break;
+ case VD_AGENT_FILE_XFER_STATUS_AGENT_NOT_CONNECTED:
+ error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
+ _( "Agent not connected."));
+ break;
+ case VD_AGENT_FILE_XFER_STATUS_DISABLED:
+ error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
+ _("File transfer is disabled by spice agent."));
+ break;
case VD_AGENT_FILE_XFER_STATUS_SUCCESS:
break;
default:
--
2.13.0
More information about the Spice-devel
mailing list