summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--doc/script_commands.txt2
-rw-r--r--src/common/socket.c29
-rw-r--r--src/login/login.c2
-rw-r--r--src/login_sql/login.c2
5 files changed, 14 insertions, 26 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 40b93bee6..89ef39a7c 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,11 +3,12 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/02/21
+ * Minor stuff (typos, socket.c, junk in login reply packet) [ultramage]
2007/02/19
* Fixed @cartlist info message typo [Lupus]
2007/02/17
- * Fixed a typo from r9778, allowing non-gm chars to use /kick [ultramage]
-
+ * Fixed a typo from r9778, allowing non-gm chars to use /kill [ultramage]
2007/02/16
* Fixed the structure of packet 0x6d (new char info). It's the same as the
one used for packet 0x6b (chars info). [FlavioJS]
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 4d55df25f..a6492b975 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4855,7 +4855,7 @@ By default timers do not have a RID attached, which lets the timers continue eve
if the player that started them logs off. To attach a RID to a timer, you can
either use the "attach flag" optional value when using initnpctimer/startnpctimer,
likewise, the optional flag of stopnpctimer detaches any RID after stopping
-the timer. One a player is attached to a timer, it stays attached to all
+the timer. Once a player is attached to a timer, it stays attached to all
timers from that script until detached manually. You can have multiple
npctimers going on at the same time as long as each one has a different player
attached (think of each RID being used as an independant timer).
diff --git a/src/common/socket.c b/src/common/socket.c
index 43422da85..fda81521d 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -589,42 +589,29 @@ int do_sendrecv(int next)
if(session[rfd.fd_array[i]])
session[rfd.fd_array[i]]->func_recv(rfd.fd_array[i]);
}
-
+#else
+ // otherwise assume that the fd_set is a bit-array and enumerate it in a standard way
+ //TODO: select() returns the number of readable sockets; use that to exit the fd_max loop faster
for (i = 1; i < fd_max; i++)
{
- if(!session[i])
- continue;
-
- if(session[i]->wdata_size)
- session[i]->func_send(i);
-
- if(session[i]->eof) //func_send can't free a session, this is safe.
- { //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex]
- session[i]->func_parse(i); //This should close the session inmediately.
- }
+ if(FD_ISSET(i,&rfd) && session[i])
+ session[i]->func_recv(i);
}
+#endif
-#else
- // otherwise assume that the fd_set is a bit-array and enumerate it in a standard way
for (i = 1; i < fd_max; i++)
{
if(!session[i])
continue;
- if(FD_ISSET(i,&rfd)){
- //ShowMessage("read:%d\n",i);
- session[i]->func_recv(i);
- }
-
if(session[i]->wdata_size)
session[i]->func_send(i);
-
- if(session[i]->eof)
+
+ if(session[i]->eof) //func_send can't free a session, this is safe.
{ //Finally, even if there is no data to parse, connections signalled eof should be closed, so we call parse_func [Skotlex]
session[i]->func_parse(i); //This should close the session inmediately.
}
}
-#endif
return 0;
}
diff --git a/src/login/login.c b/src/login/login.c
index d3ce7311b..95abd0006 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -3193,7 +3193,7 @@ int parse_login(int fd) {
WFIFOL(fd,8) = account.account_id;
WFIFOL(fd,12) = account.login_id2;
WFIFOL(fd,16) = 0; // in old version, that was for ip (not more used)
- memcpy(WFIFOP(fd,20), account.lastlogin, 24); // in old version, that was for name (not more used)
+ //memcpy(WFIFOP(fd,20), account.lastlogin, 24); // in old version, that was for name (not more used)
WFIFOB(fd,46) = account.sex;
WFIFOSET(fd,47+32*server_num);
if (auth_fifo_pos >= AUTH_FIFO_SIZE)
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 9c276c835..ad1ce91f5 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -1656,7 +1656,7 @@ int parse_login(int fd) {
WFIFOL(fd,8)=account.account_id;
WFIFOL(fd,12)=account.login_id2;
WFIFOL(fd,16)=0;
- memcpy(WFIFOP(fd,20),account.lastlogin,24);
+ //memcpy(WFIFOP(fd,20),account.lastlogin,24);
WFIFOB(fd,46)=account.sex;
WFIFOSET(fd,47+32*server_num);
if(auth_fifo_pos>=AUTH_FIFO_SIZE)