Re: [PATCH phodav 02/13] spice: rename my_input_channel

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

 



Hi

On Thu, May 23, 2019 at 10:37 AM Jakub Janků <jjanku@xxxxxxxxxx> wrote:
>
> my_input_channel_* isn't saying much,
> let's rename it to input_channel_*_thread,
> which is more fitting.
>
> Signed-off-by: Jakub Janků <jjanku@xxxxxxxxxx>
> ---
>  spice/spice-webdavd.c | 48 +++++++++++++++++++++----------------------
>  1 file changed, 24 insertions(+), 24 deletions(-)
>
> diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
> index 81fe6be..e494692 100644
> --- a/spice/spice-webdavd.c
> +++ b/spice/spice-webdavd.c
> @@ -307,11 +307,11 @@ read_thread (GTask *task,
>
>    data = g_task_get_task_data (task);
>
> -  g_debug ("my read %" G_GSIZE_FORMAT, data->count);
> +  g_debug ("thread read %" G_GSIZE_FORMAT, data->count);
>    g_input_stream_read_all (stream,
>                             data->buffer, data->count, &bread,
>                             cancellable, &error);
> -  g_debug ("my read result %" G_GSIZE_FORMAT, bread);
> +  g_debug ("thread read result %" G_GSIZE_FORMAT, bread);
>
>    if (error)
>      {
> @@ -329,13 +329,13 @@ read_thread (GTask *task,
>  }
>
>  static void
> -my_input_stream_read_async (GInputStream       *stream,
> -                            void               *buffer,
> -                            gsize               count,
> -                            int                 io_priority,
> -                            GCancellable       *cancellable,
> -                            GAsyncReadyCallback callback,
> -                            gpointer            user_data)
> +input_stream_read_async_thread (GInputStream       *stream,
> +                                void               *buffer,
> +                                gsize               count,
> +                                int                 io_priority,
> +                                GCancellable       *cancellable,
> +                                GAsyncReadyCallback callback,
> +                                gpointer            user_data)

for consistency, keep the suffix _async (& _finish)

ack otherwise

>  {
>    GTask *task;
>    ReadData *data = g_new (ReadData, 1);
> @@ -351,9 +351,9 @@ my_input_stream_read_async (GInputStream       *stream,
>  }
>
>  static gssize
> -my_input_stream_read_finish (GInputStream *stream,
> -                             GAsyncResult *result,
> -                             GError      **error)
> +input_stream_read_thread_finish (GInputStream *stream,
> +                                 GAsyncResult *result,
> +                                 GError      **error)
>  {
>    g_return_val_if_fail (g_task_is_valid (result, stream), -1);
>
> @@ -392,7 +392,7 @@ mux_data_read_cb (GObject      *source_object,
>    GError *error = NULL;
>    gssize size;
>
> -  size = my_input_stream_read_finish (G_INPUT_STREAM (source_object), res, &error);
> +  size = input_stream_read_thread_finish (G_INPUT_STREAM (source_object), res, &error);
>    g_return_if_fail (size == demux.size);
>    if (error)
>      {
> @@ -422,13 +422,13 @@ mux_size_read_cb (GObject      *source_object,
>    GError *error = NULL;
>    gssize size;
>
> -  size = my_input_stream_read_finish (G_INPUT_STREAM (source_object), res, &error);
> +  size = input_stream_read_thread_finish (G_INPUT_STREAM (source_object), res, &error);
>    if (error || size != sizeof (guint16))
>      goto end;
>
> -  my_input_stream_read_async (istream,
> -                              &demux.buf, demux.size, G_PRIORITY_DEFAULT,
> -                              cancel, mux_data_read_cb, NULL);
> +  input_stream_read_async_thread (istream,
> +                                  &demux.buf, demux.size, G_PRIORITY_DEFAULT,
> +                                  cancel, mux_data_read_cb, NULL);
>    return;
>
>  end:
> @@ -450,13 +450,13 @@ mux_client_read_cb (GObject      *source_object,
>    GError *error = NULL;
>    gssize size;
>
> -  size = my_input_stream_read_finish (G_INPUT_STREAM (source_object), res, &error);
> +  size = input_stream_read_thread_finish (G_INPUT_STREAM (source_object), res, &error);
>    g_debug ("read %" G_GSSIZE_FORMAT, size);
>    if (error || size != sizeof (gint64))
>      goto end;
> -  my_input_stream_read_async (istream,
> -                              &demux.size, sizeof (guint16), G_PRIORITY_DEFAULT,
> -                              cancel, mux_size_read_cb, NULL);
> +  input_stream_read_async_thread (istream,
> +                                  &demux.size, sizeof (guint16), G_PRIORITY_DEFAULT,
> +                                  cancel, mux_size_read_cb, NULL);
>    return;
>
>  end:
> @@ -475,9 +475,9 @@ end:
>  static void
>  start_mux_read (GInputStream *istream)
>  {
> -  my_input_stream_read_async (istream,
> -                              &demux.client, sizeof (gint64), G_PRIORITY_DEFAULT,
> -                              cancel, mux_client_read_cb, NULL);
> +  input_stream_read_async_thread (istream,
> +                                  &demux.client, sizeof (gint64), G_PRIORITY_DEFAULT,
> +                                  cancel, mux_client_read_cb, NULL);
>  }
>
>  static void client_start_read (Client *client);
> --
> 2.21.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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