Hi, On Mon, Sep 04, 2017 at 05:49:44AM -0400, Marc-André Lureau wrote: > > > static void start_demux(SpiceWebdavChannel *self); > > > @@ -361,6 +364,7 @@ static void start_client(SpiceWebdavChannel *self) > > > SoupServer *server; > > > GSocketAddress *addr; > > > GError *error = NULL; > > > + bool started; > > > > > > session = spice_channel_get_session(SPICE_CHANNEL(self)); > > > server = > > > phodav_server_get_soup_server(spice_session_get_webdav_server(session)); > > > @@ -384,7 +388,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS > > > > > > g_hash_table_insert(c->clients, &client->id, client); > > > > > > - client_start_read(client); > > > + started = client_start_read(client); > > > + g_assert(started); > > > > Isn't it assert too much? > > Since the pipe was just created for the client, it should never return > false in client_start_read(), because g_input_stream_is_closed() is > not possible. For me, assert() is appropriate in this case. I tend to > keep return_if/warnings for unexpected errors that we can cope with, > not for impossible situations (like failing to alloc, that glib assert > on too for ex). Ok, Acked-by: Victor Toso <victortoso@xxxxxxxxxx> Thanks
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel