+ Reply to Thread
Results 1 to 6 of 6

Thread: Duplicate login names don't generate LoginResponse [C#]

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Duplicate login names don't generate LoginResponse [C#]

    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#
    Last edited by tcarr; 12-19-2010 at 11:45 PM. Reason: ES5.1 is out, so changed prefix

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    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.
    Last edited by tcarr; 11-17-2010 at 01:20 AM.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    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.
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  4. The Following User Says Thank You to jobem For This Useful Post:

    tcarr (11-17-2010)

  5. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.

  6. #5
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    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
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  7. #6
    Junior Member
    Join Date
    Nov 2010
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts
    No worries. I can wait. Thanks for verifying though.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts