PDA

View Full Version : [Fixed in ES 5.1] Duplicate login names don't generate LoginResponse [C#]



evilregis
11-17-2010, 01:05 AM
I've written a C# console app to test this problem.

Here's the part that works:

On an ElectroServer instance, I add callbacks for Engine.ConnectionResponse and Engine. LoginResponse.

On the instance, I call Engine.AddServer, then Engine.Connect.
My ConnectionResponse callback gets called, and I create a LoginRequest with a valid UserName and call Engine.Send

If the UserName is unique, I get a LoginResponse callback, with the Successful flag set to true. Hooray!

Here's the part that doesn't work:

If the UserName is already in use, I do not get a call to my LoginResponse callback at all!

I would expect to get a LoginResponse callback with Successful set to false, and the Error set to UserNameExists

Some additional information:

I don't know if this helps, but if I then leave Electroserver running, and connect successfully, in the Connection response, the response object has Successful set to true, but the Error set to UserNameExists... I'm guessing ElectroServer doesn't clear out the last Error code when sending a success message. If this is true, it means ElectroServer has internally set a UserNameExists error -- it just never got down to my client.

Other things I've tried:

I've also tried registering a callback for GenericError, in case that's where the error ought to be handled. No dice.

I haven't tried this in other languages, only C#

tcarr
11-17-2010, 01:16 AM
There's a bug report in the system already - turns out that the default error message is UserNameExists, so that's there even if Successful is true.

I'll make sure there's a separate bug report about the login failure not being sent correctly in C# client. Thanks very much for such an informative bug report!

edit: Yes, this bug report was already in the system. I've added your report to the issue in hopes that more complaints mean it gets fixed sooner.

jobem
11-17-2010, 07:39 PM
Teresa, evilregis,

That bug was fixed about a week ago and will be part of our next release. Sorry Teresa, I forgot to mark the issue as resolved.

tchen
12-04-2010, 04:01 AM
Hi guys,

I'm not sure if its an artifact of the same bug but I just want to confirm that I'm not doing the architecture wrong.

Maybe the internal name check works the same way, but I have a custom login event handler and I get the same behavior above on the client when I return a ChainAction.Fail after failing to authenticate.

jobem
12-04-2010, 04:04 AM
That is the same issue. We have a patch for the client API if you need a fix now and can't wait until the next release. Just email me: jobe@electrotank.com

tchen
12-04-2010, 06:43 AM
No worries. I can wait. Thanks for verifying though.