Bug 15179 - SP based players don't keep their names, but always accept whatever was stored on the connecting server
: SP based players don't keep their names, but always accept whatever was store...
Status: CLOSED FIXED
Product: SqueezePlay
Classification: Unclassified
Component: Settings
: 7.5.x
: Macintosh Debian Linux
: P1 normal (vote)
: 7.5.0
Assigned To: Michael Herger
:
Depends on:
Blocks: 15178
  Show dependency treegraph
 
Reported: 2009-11-23 08:54 UTC by Michael Herger
Modified: 2010-04-08 17:25 UTC (History)
4 users (show)

See Also:
Category: Bug


Attachments
send playername on reconnect (1.71 KB, patch)
2009-11-24 10:39 UTC, Michael Herger
Details | Diff
send playername on reconnect and store name in appropriate settings files (5.29 KB, patch)
2009-11-24 12:05 UTC, Ben Klaas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-11-23 08:54:57 UTC
Players should store their name on the device. Whenever they connect to a different server, they should tell the server the new name (if changed).

SP based players (seen with fab4 & baby) don't do this, but always accept whatever name was stored on the server. Which means that it's having three different names on my three different servers.

This is very likely causing the connectivity issues reported in bug 15178.
Comment 1 Jim McAtee 2009-11-23 12:46:00 UTC
Didn't we see a lot of these same issues with mysb.com?  I was constantly having my Radio and Touch renamed.
Comment 2 James Richardson 2009-11-23 12:49:18 UTC
I saw these same issues on MySB.com, thought I had opened a bug on it, but can't find the bug now
Comment 3 Michael Herger 2009-11-24 01:43:32 UTC
As this is a SP bug, you'll see it with any server.
Comment 4 Jim McAtee 2009-11-24 01:55:29 UTC
But I thought it had been fixed on mysb.com prior to launching.  There was another bug for it.
Comment 5 Michael Herger 2009-11-24 02:10:26 UTC
There was another bug re. playernames, where names were synchronized using  
the usual prefs sync code. We then decided to always use the name stored  
on the player. This seems to be buggy on SP.
Comment 6 Michael Herger 2009-11-24 03:25:29 UTC
Ben - I've been digging through some of our code with the help of Felix. What I've found is that SP doesn't implement a handler for the SETD slimproto command. Looking at SlimProto.lua there's an opcode table without SETD. SETD is used to control some of the prefs stored on the player. Very likely none of them is/was used in SP based devices, except for the playername:

	'playername' => {
		firmwareid => 0,
		pack => 'Z*',
	},
	'digitalOutputEncoding' => {
		firmwareid => 1,
		pack => 'C',
	},
	'wordClockOutput' => {
		firmwareid => 2,
		pack => 'C',
	},
	'powerOffDac' => { # (Transporter only)
		firmwareid => 3,
		pack => 'C',
	},
	'disableDac' => { # (Squezebox2/3 only)
		firmwareid => 4,
		pack => 'C',
	},
	'fxloopSource' => { # (Transporter only)
		firmwareid => 5,
		pack => 'C',
	},
	'fxloopClock' => { # (Transporter only)
		firmwareid => 6,
		pack => 'C',
	},

(from S::P::Squeezebox2)
Comment 7 Michael Herger 2009-11-24 10:39:22 UTC
Created attachment 6339 [details]
send playername on reconnect
Comment 8 Michael Herger 2009-11-24 10:43:11 UTC
Andy/Ben - could you please review the attached patch?

There's still an issue with the player name: it's being stored in Playback.lua, but read from SlimDiscovery.lua. Which means: the above patch is working just fine, as long as you don't restart the player...
Comment 9 Ben Klaas 2009-11-24 12:05:47 UTC
Created attachment 6340 [details]
send playername on reconnect and store name in appropriate settings files

Michael, can you give this patch a try?

This takes your patch and adds the following functions in _setd():

stores playerInit information (including name) in Playback.lua's settings file

if currently controlling a local player, stores playerInit information (including name) in SlimDiscovery.lua's settings file
Comment 10 SVN Bot 2009-11-25 03:46:36 UTC
 == Auto-comment from SVN commit #8154 to the jive repo by michael ==
 == https://svn.slimdevices.com/jive?view=revision&revision=8154 ==

Fixed Bug: 15179
Description:
- add SETD slimprot handling (read-only for now) to send the device's name to the server when connecting
- have SlimDiscovery listen to playerNewName events and set player's name accordingly
Comment 11 Chris Owens 2010-04-08 17:25:09 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!