We erroneously though that an attempt to receive data was not possible if the SC
was waiting for more room in the channel buffer. A BUG_ON() was added to detect
bugs. And in fact, it is possible.
The regression was added in commit
341a5783b ("BUG/MEDIUM: stconn: stop to
enable/disable reads from streams via si_update_rx").
This patch should fix the issue #2115. It must be backported if the commit
above is backported.
/* If another call to sc_conn_recv() failed, and we subscribed to
* recv events already, give up now.
*/
- if (sc->wait_event.events & SUB_RETRY_RECV)
+ if ((sc->wait_event.events & SUB_RETRY_RECV) || sc_waiting_room(sc))
return 0;
/* maybe we were called immediately after an asynchronous shutr */
/* prepare to detect if the mux needs more room */
sc_ep_clr(sc, SE_FL_WANT_ROOM);
- BUG_ON(sc_waiting_room(sc));
if ((ic->flags & (CF_STREAMER | CF_STREAMER_FAST)) && !co_data(ic) &&
global.tune.idle_timer &&