[Spice-devel] [PATCH spice-gtk 09/16] channel-main: file_xfer_failed -> file_xfer_completed
Christophe Fergeau
cfergeau at redhat.com
Mon Apr 8 09:31:45 PDT 2013
Why not, ACK.
Christophe
On Fri, Mar 29, 2013 at 12:40:21PM +0100, Hans de Goede wrote:
> Make file_xfer_failed usable for all file_stream closing.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> gtk/channel-main.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c
> index bd27ef4..10ba175 100644
> --- a/gtk/channel-main.c
> +++ b/gtk/channel-main.c
> @@ -2581,12 +2581,13 @@ void spice_main_set_display_enabled(SpiceMainChannel *channel, int id, gboolean
> update_display_timer(channel, 1);
> }
>
> -static void file_xfer_failed(SpiceFileXferTask *task, GError *error)
> +static void file_xfer_completed(SpiceFileXferTask *task, GError *error)
> {
> - SPICE_DEBUG("File %s xfer failed: %s",
> - g_file_get_path(task->file), error->message);
> -
> - task->error = error;
> + if (error) {
> + SPICE_DEBUG("File %s xfer failed: %s",
> + g_file_get_path(task->file), error->message);
> + task->error = error;
> + }
> g_input_stream_close_async(G_INPUT_STREAM(task->file_stream),
> G_PRIORITY_DEFAULT,
> task->cancellable,
> @@ -2642,7 +2643,7 @@ static void file_xfer_info_async_cb(GObject *obj, GAsyncResult *res, gpointer da
> return;
>
> failed:
> - file_xfer_failed(task, error);
> + file_xfer_completed(task, error);
> }
>
> static void file_xfer_read_async_cb(GObject *obj, GAsyncResult *res, gpointer data)
> @@ -2653,7 +2654,7 @@ static void file_xfer_read_async_cb(GObject *obj, GAsyncResult *res, gpointer da
>
> task->file_stream = g_file_read_finish(file, res, &error);
> if (error) {
> - file_xfer_failed (task, error);
> + file_xfer_completed(task, error);
> return;
> }
>
> --
> 1.8.1.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130408/245f9452/attachment.pgp>
More information about the Spice-devel
mailing list