The online racing simulator
[RFC] InSim Admin password
(8 posts, started )
[RFC] InSim Admin password
Right now if you connect to InSim with wrong password you won't get any reply. It would be much better if there is a packet that will tell if password is wrong, so you could instantly notify the user about it.

Another thing about Admin password, why require password if InSim connection is coming from local PC and connecting to LFS game (not DEDI)?
Allow connections from 127.0.0.1 and ::1 without a password. What about linux servers running multiple hosts on a single machine? If I were on the same VHOST as another server wouldn't I be able to commandeer their server.
I wrote:
Quote :connecting to LFS game (not DEDI)

Allow to just game, not hosts (DEDI).
Ah ... Yeah. Sorry about that. I don't see an issue with it then.
Having some specific response is always better than just nothing Smile

Currently I am kinda able to guess that the password is wrong but having such a packet will make client code much cleaner and correct.
What I do at the moment is wait 5 seconds for a reply and if there is nothing I assume password is wrong. Still there were cases when I didn't get reply within 5 seconds even when password was right (PC was extremely busy with other stuff).
I see what you mean, but to make it reliable I would have to code something that sends the reply, doesn't close the socket, then closes it a short time later, like half a second.

Because in the past when I've tried to send the final packet and immediately close the socket, the final packet is often not received, even though I think I set the correct options on the socket. This is possible of course and it's on my notes but I don't want to give it a high priority. I wanted to mention though, you shouldn't need to wait 5 seconds. If the password is wrong, LFS closes the socket immediately, so you should be able to detect that instantly (though you don't know for sure why it was closed when you sent the ISI).
I didn't know that socket is immeditely closed. I have multiple threads taking care of this, and the one responsible for recv got into blocking until receive VER. Anyway, on wrong password there is now immediate message with error.

[RFC] InSim Admin password
(8 posts, started )
FGED GREDG RDFGDR GSFDG