summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-09 09:09:35 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-04-09 09:09:35 +0000
commit1260d294ed795011b5b73284e308a6a01d9eef9e (patch)
tree6663a0ae44f8ac7d830598311411843401f129a1 /src/common/socket.c
parent28532995686a5315ddf0ad6557ae00cb2fe76206 (diff)
downloadhercules-1260d294ed795011b5b73284e308a6a01d9eef9e.tar.gz
hercules-1260d294ed795011b5b73284e308a6a01d9eef9e.tar.bz2
hercules-1260d294ed795011b5b73284e308a6a01d9eef9e.tar.xz
hercules-1260d294ed795011b5b73284e308a6a01d9eef9e.zip
* Merged changes from trunk [14742:14782/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14783 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 0a576e517..262351dcf 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -749,7 +749,7 @@ int do_sockets(int next)
if(session[i]->wdata_size)
session[i]->func_send(i);
- if(session[i]->eof) //func_send can't free a session, this is safe.
+ if(session[i]->flag.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 immediately.
}
@@ -1351,9 +1351,6 @@ void send_shortlist_do_sends()
{
int i = 0;
- // Assume all or most of the fd's don't remain in the shortlist
- memset(send_shortlist_set, 0, sizeof(send_shortlist_set));
-
while( i < send_shortlist_count )
{
int fd = send_shortlist_array[i];
@@ -1375,7 +1372,6 @@ void send_shortlist_do_sends()
// be sent from it we'll keep it in the shortlist.
if( session[fd] && !session[fd]->flag.eof && session[fd]->wdata_size )
{
- send_shortlist_set[fd/32] |= 1<<(fd%32);
++i;
continue;
}
@@ -1383,6 +1379,7 @@ void send_shortlist_do_sends()
// Remove fd from shortlist, move the last fd to the current position
send_shortlist_array[i] = send_shortlist_array[--send_shortlist_count];
+ send_shortlist_set[fd/32]&=~(1<<(fd%32));
}
}
#endif