From: Adam Goode Date: Wed, 4 Jun 2014 15:20:55 +0000 (-0400) Subject: ALSA: seq: Continue broadcasting events to ports if one of them fails X-Git-Tag: omap-for-v3.16/fixes-against-rc1~21^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27423257b7e6b236f0ea40d939e5842f63dac949;p=pandora-kernel.git ALSA: seq: Continue broadcasting events to ports if one of them fails Sometimes PORT_EXIT messages are lost when a process is exiting. This happens if you subscribe to the announce port with client A, then subscribe to the announce port with client B, then kill client A. Client B will not see the PORT_EXIT message because client A's port is closing and is earlier in the announce port subscription list. The for each loop will try to send the announcement to client A and fail, then will stop trying to broadcast to other ports. Killing B works fine since the announcement will already have gone to A. The CLIENT_EXIT message does not get lost. How to reproduce problem: *** termA $ aseqdump -p 0:1 0:1 Port subscribed 0:1 -> 128:0 *** termB $ aseqdump -p 0:1 *** termA 0:1 Client start client 129 0:1 Port start 129:0 0:1 Port subscribed 0:1 -> 129:0 *** termB 0:1 Port subscribed 0:1 -> 129:0 *** termA ^C *** termB 0:1 Client exit client 128 <--- expected Port exit as well (before client exit) Signed-off-by: Adam Goode Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed