[Spice-devel] [PATCH spice-gtk] spice-channel: Allow calling spice_msg_out_send from any context

Alon Levy alevy at redhat.com
Tue Jan 17 05:21:22 PST 2012


On Tue, Jan 17, 2012 at 01:58:52PM +0100, Hans de Goede wrote:
> Hi,
> 
> On 01/17/2012 01:50 PM, Alon Levy wrote:
> >>@@ -664,17 +681,23 @@ void spice_msg_out_send(SpiceMsgOut *out)
> >>      g_return_if_fail(out->channel != NULL);
> >>
> >>      g_static_mutex_lock(&out->channel->priv->xmit_queue_lock);
> >>-    if (!out->channel->priv->xmit_queue_blocked)
> >
> >Just one thing I don't understand, not related to the current patch (was
> >this way before) - we drop everything on the floor if
> >xmit_queue_blocked, which is only set between channel_reset and
> >channel_connect. Why don't we log this error? (no, I'm not saying we
> >should assert on this..)
> 
> xmit_queue_blocked is there to stop the usb event thread from queuing
> new usbredir packets (like hey this and this usb transfer failed with
> -ENODEV) after a device (and thus also a usbredir channel)
> disconnect.
> 
> So the if actually is expected to trigger in some normal cases, hence no
> error log.

ok, understood.

> 
> Regards,
> 
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list