Fix some nasty bugs related to read/write events and timeout events.

This would have caused users not being able to log in, and in some cases
100% cpu usage.
This commit is contained in:
Jan Vidar Krey
2009-07-19 02:12:50 +02:00
parent abd097acf0
commit 4a173bf066
6 changed files with 51 additions and 76 deletions

View File

@@ -18,7 +18,6 @@
*/
#include "uhub.h"
#define DEBUG_SENDQ 1
int route_message(struct hub_info* hub, struct user* u, struct adc_message* msg)
{
@@ -110,8 +109,7 @@ int route_to_user(struct hub_info* hub, struct user* user, struct adc_message* m
/* Perform oportunistic write */
handle_net_write(user);
}
if (hub_sendq_get_bytes(user->net.send_queue))
else
{
user_net_io_want_write(user);
}