On 03/19/2014 07:33 PM, Marc-André Lureau wrote: > Hi > > On Mon, Mar 17, 2014 at 8:54 AM, Alon Levy <al...@redhat.com> wrote: > >> Would be nice to use an actual constant for this instead of relying on >> G_MAXUINT16 here and above. >> > > > Sorry, I forgot to address your comments. > > What about MAX_MUX_SIZE?
ACK. > > Rest of the diff would be: > > diff --git a/gtk/channel-webdav.c b/gtk/channel-webdav.c > index ffd617e..2cc242b 100644 > --- a/gtk/channel-webdav.c > +++ b/gtk/channel-webdav.c > @@ -79,7 +79,7 @@ typedef struct _OutputQueueElem { > OutputQueue *queue; > const guint8 *buf; > gsize size; > - GFunc cb; > + GFunc pushed_cb; > gpointer user_data; > } OutputQueueElem; > > @@ -97,7 +97,6 @@ static void output_queue_free(OutputQueue *queue) > { > g_warn_if_fail(g_queue_get_length(queue->queue) == 0); > g_warn_if_fail(!queue->flushing); > - g_warn_if_fail(!queue->idle_id); > > g_queue_free_full(queue->queue, g_free); > g_clear_object(&queue->output); > @@ -150,8 +149,8 @@ static gboolean output_queue_idle(gpointer user_data) > g_output_stream_write_all(q->output, e->buf, e->size, NULL, NULL, > &error); > if (error) > goto err; > - else if (e->cb) > - e->cb(q, e->user_data); > + else if (e->pushed_cb) > + e->pushed_cb(q, e->user_data); > > q->flushing = TRUE; > g_output_stream_flush_async(q->output, G_PRIORITY_DEFAULT, NULL, > output_queue_flush_cb, e); > @@ -173,7 +172,7 @@ static void output_queue_push(OutputQueue *q, const > guint8 *buf, gsize size, > > e->buf = buf; > e->size = size; > - e->cb = pushed_cb; > + e->pushed_cb = pushed_cb; > e->user_data = user_data; > e->queue = q; > g_queue_push_tail(q->queue, e); > @@ -248,6 +247,8 @@ static void mux_pushed_cb(OutputQueue *q, gpointer > user_data) > client_unref(client); > > _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel