PDA

View Full Version : Help. Can't Disconnect from SN



pippin
2008-05-09, 05:20
I'm trying to disconnect a player from SN throug SC's JSON/RPC I/F and it doesn't work.

What I try is:



[08-05-09 14:10:07.2393] Slim::Web::JSONRPC::handleURI (126) JSON parsed procedure: {
id => 1,
method => "slim.request",
params => ["", ["squeezenetwork", "disconnect", "XX:XX:XX:XX:XX:XX"]],
}


and I get



[08-05-09 14:10:07.2399] Slim::Web::JSONRPC::requestMethod (308) requestMethod(["", ["squeezenetwork", "disconnect", "XX:XX:XX:XX:XX:XX"]])
[08-05-09 14:10:07.2404] Slim::Web::JSONRPC::requestMethod (352) Dispatching...
[08-05-09 14:10:07.2425] Slim::Web::JSONRPC::requestMethod (370) Request is async: will be back
[08-05-09 14:10:09.3918] Slim::Networking::SqueezeNetwork::Players::_discon nect_player_error (193) Disconnect SN player error: Ungültige Player-ID.
[08-05-09 14:10:09.3924] Slim::Web::JSONRPC::requestWrite (398) requestWrite()
[08-05-09 14:10:09.3935] Slim::Web::JSONRPC::generateJSONResponse (278) generateJSONResponse()
[08-05-09 14:10:09.3951] Slim::Web::JSONRPC::writeResponse (224) JSON response: {
id => 1,
method => "slim.request",
params => ["", ["squeezenetwork", "disconnect", "XX:XX:XX:XX:XX:XX"]],
result => {
# tied Tie::IxHash
error => "Ung\xFCltige Player-ID.",
},
}


What am I doing wrong?

andyg
2008-05-09, 05:34
On May 9, 2008, at 8:20 AM, pippin wrote:

>
> I'm trying to disconnect a player from SN throug SC's JSON/RPC I/F and
> it doesn't work.
>
> What I try is:
>
>
> Code:
> --------------------
>
> [08-05-09 14:10:07.2393] Slim::Web::JSONRPC::handleURI (126) JSON
> parsed procedure: {
> id => 1,
> method => "slim.request",
> params => ["", ["squeezenetwork", "disconnect",
> "XX:XX:XX:XX:XX:XX"]],
> }
>
> --------------------
>
>
> and I get
>
>
> Code:
> --------------------
>
> [08-05-09 14:10:07.2399] Slim::Web::JSONRPC::requestMethod (308)
> requestMethod(["", ["squeezenetwork", "disconnect",
> "XX:XX:XX:XX:XX:XX"]])
> [08-05-09 14:10:07.2404] Slim::Web::JSONRPC::requestMethod (352)
> Dispatching...
> [08-05-09 14:10:07.2425] Slim::Web::JSONRPC::requestMethod (370)
> Request is async: will be back
> [08-05-09 14:10:09.3918]
> Slim::Networking::SqueezeNetwork::Players::_discon nect_player_error
> (193) Disconnect SN player error: Ungültige Player-ID.
> [08-05-09 14:10:09.3924] Slim::Web::JSONRPC::requestWrite (398)
> requestWrite()
> [08-05-09 14:10:09.3935] Slim::Web::JSONRPC::generateJSONResponse
> (278) generateJSONResponse()
> [08-05-09 14:10:09.3951] Slim::Web::JSONRPC::writeResponse (224)
> JSON response: {
> id => 1,
> method => "slim.request",
> params => ["", ["squeezenetwork", "disconnect",
> "XX:XX:XX:XX:XX:XX"]],
> result => {
> # tied Tie::IxHash
> error => "Ung\xFCltige Player-ID.",
> },
> }
>
> --------------------
>
>
> What am I doing wrong?

The disconnect command takes a player ID, not a MAC. A MAC would work
though, I'll file an enhancement.

pippin
2008-05-09, 05:38
The disconnect command takes a player ID, not a MAC. A MAC would work
though, I'll file an enhancement.

So where do I get that from? SC returns the MAC as playerid.

andyg
2008-05-09, 05:42
On May 9, 2008, at 8:34 AM, Andy Grundman wrote:

> On May 9, 2008, at 8:20 AM, pippin wrote:
>
>>
>> I'm trying to disconnect a player from SN throug SC's JSON/RPC I/F
>> and
>> it doesn't work.
>>
>> What I try is:
>>
>>
>> Code:
>> --------------------
>>
>> [08-05-09 14:10:07.2393] Slim::Web::JSONRPC::handleURI (126) JSON
>> parsed procedure: {
>> id => 1,
>> method => "slim.request",
>> params => ["", ["squeezenetwork", "disconnect",
>> "XX:XX:XX:XX:XX:XX"]],
>> }
>>
>> --------------------
>>
>>
>> and I get
>>
>>
>> Code:
>> --------------------
>>
>> [08-05-09 14:10:07.2399] Slim::Web::JSONRPC::requestMethod (308)
>> requestMethod(["", ["squeezenetwork", "disconnect",
>> "XX:XX:XX:XX:XX:XX"]])
>> [08-05-09 14:10:07.2404] Slim::Web::JSONRPC::requestMethod (352)
>> Dispatching...
>> [08-05-09 14:10:07.2425] Slim::Web::JSONRPC::requestMethod (370)
>> Request is async: will be back
>> [08-05-09 14:10:09.3918]
>> Slim::Networking::SqueezeNetwork::Players::_discon nect_player_error
>> (193) Disconnect SN player error: Ungültige Player-ID.
>> [08-05-09 14:10:09.3924] Slim::Web::JSONRPC::requestWrite (398)
>> requestWrite()
>> [08-05-09 14:10:09.3935] Slim::Web::JSONRPC::generateJSONResponse
>> (278) generateJSONResponse()
>> [08-05-09 14:10:09.3951] Slim::Web::JSONRPC::writeResponse (224)
>> JSON response: {
>> id => 1,
>> method => "slim.request",
>> params => ["", ["squeezenetwork", "disconnect",
>> "XX:XX:XX:XX:XX:XX"]],
>> result => {
>> # tied Tie::IxHash
>> error => "Ung\xFCltige Player-ID.",
>> },
>> }
>>
>> --------------------
>>
>>
>> What am I doing wrong?
>
> The disconnect command takes a player ID, not a MAC. A MAC would work
> though, I'll file an enhancement.

Was an easy change, give it a try now.

pippin
2008-05-09, 05:43
Just discovered, that this might be an SoftSqueeze/Squeezeslave issue. I also cannot disconnect the player using the Default skin even though that says it would do so...

So maybe more like a bug than an enhancement request.

Should it work with a "real" playerid returned from SC as I did it above (OK, I can try that myself tonight ;-)

mherger
2008-05-09, 06:23
> I'm trying to disconnect a player from SN throug SC's JSON/RPC I/F and
> it doesn't work.

Also in 7.1 there will be a generic "disconnect" command which will allow you to disconnect a player from another server and connect it to the current server.

disconnect <playerid> <remote server>

--

Michael

pippin
2008-05-09, 06:27
Thanks for the quick change. Did try it.

Let's say it somewhat works.
It shows up as disconnected in both SC and SN, but SoftSqueeze crashes during the process (reproducably, SqueezeSlave 3.6 MAC) which it does not do when disconnecting through the SN web page (with a browser, not SqueezeSlave.

After restarting I one time even had a SqueezeSlave that was connected to BOTH SN and SC (SC reported it back as SC and SN client):


players_loop => [
{
# tied Tie::IxHash
canpoweroff => 1,
connected => 1,
displaytype => "graphic-320x32",
ip => "127.0.0.1:58982",
isplayer => 1,
model => "softsqueeze",
name => "SoftSqueezeMac",
playerid => "17:31:XX:XX:XX:XX",
power => 1,
uuid => undef,
},
{
# tied Tie::IxHash
canpoweroff => 1,
connected => 1,
displaytype => "none",
ip => "127.0.0.1:53752",
isplayer => 1,
model => "squeezeslave",
name => "Squeezeslave",
playerid => "01:01:01:01:01:01",
power => 1,
uuid => undef,
},
],
"sn player count" => 1,
sn_players_loop => [
{
# tied Tie::IxHash
id => 302_551,
name => "SoftSqueezeMac",
playerid => "17:31:XX:XX:XX:XX",
},
],
version => "7.0",

andyg
2008-05-09, 06:35
On May 9, 2008, at 9:27 AM, pippin wrote:

>
> Thanks for the quick change. Did try it.
>
> Let's say it somewhat works.
> It shows up as disconnected in both SC and SN, but SoftSqueeze crashes
> during the process (reproducably, SqueezeSlave 3.6 MAC) which it does
> not do when disconnecting through the SN web page (with a browser, not
> SqueezeSlave.

I'm pretty sure Softsqueeze supports the serv command, but why don't
you try it with a real player? Can't comment on Squeezeslave.

mherger
2008-05-09, 06:39
> Let's say it somewhat works.
> It shows up as disconnected in both SC and SN, but SoftSqueeze crashes
> during the process (reproducably, SqueezeSlave 3.6 MAC) which it does
> not do when disconnecting through the SN web page (with a browser, not
> SqueezeSlave.

I have also seen issues with switching server with SoftSqueeze. I think it's rather a SoftSqueeze bug, than an issue with the command itself.

--

Michael

pippin
2008-05-09, 07:05
I'm pretty sure Softsqueeze supports the serv command, but why don't
you try it with a real player? Can't comment on Squeezeslave.

becuase my real players are at home vs. I am not ;-)



I have also seen issues with switching server with SoftSqueeze. I think it's rather a SoftSqueeze bug, than an issue with the command itself.


Actually, I'm not sure it's SoftSqueeze, I suspects it's actually SC. What I see is, that also when I quit SqueezeSlave or SoftSqueeze they are not disconnected from the server.

pippin
2008-05-09, 11:11
Works with a "real" player