Fix use of wrong event types.

This commit is contained in:
Jan Vidar Krey 2009-08-04 04:47:02 +02:00
parent 5baf277f5a
commit ffd455474a
1 changed files with 3 additions and 9 deletions

View File

@ -50,7 +50,7 @@ struct hub_user* user_create(struct hub_info* hub, int sd, struct ip_addr_encap*
user->net.send_queue = hub_sendq_create(); user->net.send_queue = hub_sendq_create();
user->net.recv_queue = hub_recvq_create(); user->net.recv_queue = hub_recvq_create();
net_con_initialize(&user->net.connection, sd, addr, net_event, user, EV_READ); net_con_initialize(&user->net.connection, sd, addr, net_event, user, NET_EVENT_READ);
net_con_set_timeout(&user->net.connection, TIMEOUT_CONNECTED); net_con_set_timeout(&user->net.connection, TIMEOUT_CONNECTED);
user_set_state(user, state_protocol); user_set_state(user, state_protocol);
@ -314,18 +314,12 @@ int user_is_registered(struct hub_user* user)
void user_net_io_want_write(struct hub_user* user) void user_net_io_want_write(struct hub_user* user)
{ {
#ifdef DEBUG_SENDQ net_con_update(&user->net.connection, NET_EVENT_READ | NET_EVENT_WRITE);
LOG_TRACE("user_net_io_want_write: %s (pending: %d)", user_log_str(user), event_pending(&user->net.event, EV_READ | EV_WRITE, 0));
#endif
net_con_update(&user->net.connection, EV_READ | EV_WRITE);
} }
void user_net_io_want_read(struct hub_user* user) void user_net_io_want_read(struct hub_user* user)
{ {
#ifdef DEBUG_SENDQ net_con_update(&user->net.connection, NET_EVENT_READ);
LOG_TRACE("user_net_io_want_read: %s (pending: %d)", user_log_str(user), event_pending(&user->net.event, EV_READ | EV_WRITE, 0));
#endif
net_con_update(&user->net.connection, EV_READ);
} }
const char* user_get_quit_reason_string(enum user_quit_reason reason) const char* user_get_quit_reason_string(enum user_quit_reason reason)