Bugzilla – Bug 9899
Send 'dsco' for an unrecognized player type
Last modified: 2009-09-08 09:20:45 UTC
SC should send 'dsco' before the connection is closed in SlimProto.pm when a newer (unsupported) player tries to connect (around line 985). This tells the player to disconnect and stop trying to reconnect. Currently this message is unused, so should be tested on the ip3k firmware (I have just implemented and tested on squeezeplay).
I checked ip3k fw and it seems to do the correct thing when receiving a 'dsco' event. Same happens as if the user presses and holds 'back' to disconnect. Sending the 'dsco' event from SC using $client->sendFrame('dsco'); does not work though because $client is not defined at that stage. We only have a handle to the socket. I found it works by doing this: $frame = pack('n', 4) . 'dsco'; Slim::Networking::Select::writeNoBlock( $s, \$frame); Is that the correct thing to do or is there a better way?
It looks fine to me, I'd like Andy and Dean to comment.
Sure, that should work fine.
Code looks good by me. In this case the user experience would be that it bounces back after they hit the right arrow to connect. Do we want to display some kind of message?
If we want a message, would that be a single one, predefined on the player or a set of predefined messages selected from SC or a free text message sent from SC?
Done in SC 7.3 r23944. We can still add a message later if needed.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC