git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@6 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
0423b13f0c
commit
b167642632
@ -1175,7 +1175,9 @@ int parse_tologin(int fd) {
|
|||||||
// only login-server can have an access to here.
|
// only login-server can have an access to here.
|
||||||
// so, if it isn't the login-server, we disconnect the session.
|
// so, if it isn't the login-server, we disconnect the session.
|
||||||
//session eof check!
|
//session eof check!
|
||||||
if (fd != login_fd || session[fd]->eof) {
|
if(fd != login_fd)
|
||||||
|
session[fd]->eof = 1;
|
||||||
|
if(session[fd]->eof) {
|
||||||
if (fd == login_fd) {
|
if (fd == login_fd) {
|
||||||
printf("Char-server can't connect to login-server (connection #%d).\n", fd);
|
printf("Char-server can't connect to login-server (connection #%d).\n", fd);
|
||||||
login_fd = -1;
|
login_fd = -1;
|
||||||
@ -1459,7 +1461,9 @@ int parse_frommap(int fd) {
|
|||||||
for(id = 0; id < MAX_MAP_SERVERS; id++)
|
for(id = 0; id < MAX_MAP_SERVERS; id++)
|
||||||
if (server_fd[id] == fd)
|
if (server_fd[id] == fd)
|
||||||
break;
|
break;
|
||||||
if(id == MAX_MAP_SERVERS || session[fd]->eof) {
|
if(id == MAX_MAP_SERVERS)
|
||||||
|
session[fd]->eof = 1;
|
||||||
|
if(session[fd]->eof) {
|
||||||
if (id < MAX_MAP_SERVERS) {
|
if (id < MAX_MAP_SERVERS) {
|
||||||
memset(&server[id], 0, sizeof(struct mmo_map_server));
|
memset(&server[id], 0, sizeof(struct mmo_map_server));
|
||||||
printf("Map-server %d (session #%d) has disconnected.\n", id, fd);
|
printf("Map-server %d (session #%d) has disconnected.\n", id, fd);
|
||||||
@ -1976,7 +1980,9 @@ int parse_char(int fd) {
|
|||||||
struct char_session_data *sd;
|
struct char_session_data *sd;
|
||||||
unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
|
unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
|
||||||
|
|
||||||
if(login_fd < 0 || session[fd]->eof) {
|
if(login_fd < 0)
|
||||||
|
session[fd]->eof = 1;
|
||||||
|
if(session[fd]->eof) {
|
||||||
if (fd == login_fd)
|
if (fd == login_fd)
|
||||||
login_fd = -1;
|
login_fd = -1;
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user