<div dir="ltr"><div class="gmail_extra">Hi<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 17, 2014 at 8:54 AM, Alon Levy <span dir="ltr"><<a href="mailto:alevy@redhat.com" target="_blank">alevy@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":4zr" class="" style="overflow:hidden">Would be nice to use an actual constant for this instead of relying on<br>
G_MAXUINT16 here and above.</div></blockquote></div><br><br></div><div class="gmail_extra">Sorry, I forgot to address your comments.<br clear="all"></div><div class="gmail_extra"><br></div><div class="gmail_extra">What about MAX_MUX_SIZE?<br>
<br>Rest of the diff would be:<br><br>diff --git a/gtk/channel-webdav.c b/gtk/channel-webdav.c<br>index ffd617e..2cc242b 100644<br>--- a/gtk/channel-webdav.c<br>+++ b/gtk/channel-webdav.c<br>@@ -79,7 +79,7 @@ typedef struct _OutputQueueElem {<br>
OutputQueue *queue;<br> const guint8 *buf;<br> gsize size;<br>- GFunc cb;<br>+ GFunc pushed_cb;<br> gpointer user_data;<br> } OutputQueueElem;<br> <br>@@ -97,7 +97,6 @@ static void output_queue_free(OutputQueue *queue)<br>
{<br> g_warn_if_fail(g_queue_get_length(queue->queue) == 0);<br> g_warn_if_fail(!queue->flushing);<br>- g_warn_if_fail(!queue->idle_id);<br> <br> g_queue_free_full(queue->queue, g_free);<br> g_clear_object(&queue->output);<br>
@@ -150,8 +149,8 @@ static gboolean output_queue_idle(gpointer user_data)<br> g_output_stream_write_all(q->output, e->buf, e->size, NULL, NULL, &error);<br> if (error)<br> goto err;<br>- else if (e->cb)<br>
- e->cb(q, e->user_data);<br>+ else if (e->pushed_cb)<br>+ e->pushed_cb(q, e->user_data);<br> <br> q->flushing = TRUE;<br> g_output_stream_flush_async(q->output, G_PRIORITY_DEFAULT, NULL, output_queue_flush_cb, e);<br>
@@ -173,7 +172,7 @@ static void output_queue_push(OutputQueue *q, const guint8 *buf, gsize size,<br> <br> e->buf = buf;<br> e->size = size;<br>- e->cb = pushed_cb;<br>+ e->pushed_cb = pushed_cb;<br>
e->user_data = user_data;<br> e->queue = q;<br> g_queue_push_tail(q->queue, e);<br>@@ -248,6 +247,8 @@ static void mux_pushed_cb(OutputQueue *q, gpointer user_data)<br> client_unref(client);<br><br>
<br></div><div class="gmail_extra">-- <br>Marc-André Lureau
</div></div>