diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-23 15:33:51 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-11-23 15:33:51 +0000 |
commit | 6125b6bc5204a618e6fc8976600332a423bd0fc0 (patch) | |
tree | 360d8a40b968249f79e604e05e7545a6aa0f47c9 /src/map/chrif.c | |
parent | da0983d53b36267e16212ba58453c442eaaf1f18 (diff) | |
download | hercules-6125b6bc5204a618e6fc8976600332a423bd0fc0.tar.gz hercules-6125b6bc5204a618e6fc8976600332a423bd0fc0.tar.bz2 hercules-6125b6bc5204a618e6fc8976600332a423bd0fc0.tar.xz hercules-6125b6bc5204a618e6fc8976600332a423bd0fc0.zip |
- Made WFIFOHEAD() check for available buffer size remaining on the connection, and when there's not enough space, it will increase it.
- Added define TURBO to the Makefile. It enables MouseJstr's socket access optimization which should speed up the code when accessing the write/read buffers repeatedly within a function.
- Fixed the functions where the RFIFOHEAD/WFIFOHEAD functions were used incorrectly (prevents TURBO enabled compilations from finishing)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9297 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 7039a8d71..e08ee8cdf 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -319,9 +319,11 @@ int chrif_removemap(int fd){ }
int chrif_save_ack(int fd) {
- int aid = RFIFOL(fd,2), cid = RFIFOL(fd,6);
- struct map_session_data *sd = map_id2sd(aid);
- if (sd && sd->status.char_id == cid)
+ struct map_session_data *sd;
+ RFIFOHEAD(fd);
+ sd = map_id2sd(RFIFOL(fd,2));
+
+ if (sd && sd->status.char_id == RFIFOL(fd,6))
map_quit_ack(sd);
return 0;
}
@@ -1410,7 +1412,7 @@ int chrif_disconnect(int fd) { void chrif_update_ip(int fd){
unsigned long new_ip;
-
+ WFIFOHEAD(fd, 6);
new_ip = resolve_hostbyname(char_ip_str, NULL, NULL);
if (new_ip && new_ip != char_ip)
char_ip = new_ip; //Update char_ip
|