<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 6:35 PM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@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=":cgt" class="" style="overflow:hidden">'git grep <span class="">spice_channel_disconnect</span>' gives:<br>
doc/reference/<span class="">spice</span>-gtk-sections.txt:spice_channel_<span class="">disconnect</span><br>
gtk/<span class="">channel</span>-main.c: <span class="">spice_channel_disconnect</span>(<span class="">channel</span>, SPICE_CHANNEL_SWITCHING);<br>
gtk/map-file:spice_channel_<span class="">disconnect</span>;<br>
gtk/<span class="">spice</span>-<span class="">channel</span>.c: <span class="">spice_channel_disconnect</span>(<span class="">channel</span>, SPICE_CHANNEL_CLOSED);<br>
gtk/<span class="">spice</span>-<span class="">channel</span>.c: <span class="">spice_channel_disconnect</span>(<span class="">channel</span>, SPICE_CHANNEL_NONE);<br>
gtk/<span class="">spice</span>-<span class="">channel</span>.c: * <span class="">spice_channel_disconnect</span>:<br>
gtk/<span class="">spice</span>-<span class="">channel</span>.c:void <span class="">spice_channel_disconnect</span>(SpiceChannel *<span class="">channel</span>, SpiceChannelEvent reason)<br>
gtk/<span class="">spice</span>-<span class="">channel</span>.h:void <span class="">spice_channel_disconnect</span>(SpiceChannel *<span class="">channel</span>, SpiceChannelEvent reason);<br>
gtk/<span class="">spice</span>-glib-sym-file:spice_channel_disconnect<br>
gtk/spicy.c: <span class="">spice_channel_disconnect</span>(<span class="">channel</span>, SPICE_CHANNEL_CLOSED);<br>
<br>
so the 'reason' argument to <span class="">spice_channel_disconnect</span>() will never indicate an error.<br>
</div></blockquote><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=":cgt" class="" style="overflow:hidden">I think the code path you want to get triggered is the 'c->has_error = TRUE' part of<br>
<span class="">spice_channel_disconnect</span>() (which is not called when c->state is SPICE_CHANNEL_STATE_UNCONNECTED).<br>
Once 'has_error' is set to TRUE, this will trigger the emission of an error in spice_channel_iterate()<br>
<span class=""><font color="#888888"></font></span></div></blockquote></div><br><div><br></div>Any reason other than SPICE_CHANNEL_OPENED is enough to abort the migration (migrate_channel_event_cb).<br><br clear="all"><br>-- <br><div class="gmail_signature">Marc-André Lureau</div>
</div></div>