Work on epoll backend, and removing dependency on libevent.
This commit is contained in:
@@ -457,7 +457,7 @@ const char* acl_password_generate_challenge(struct acl_handle* acl, struct hub_u
|
||||
static char tiger_buf[MAX_CID_LEN+1];
|
||||
|
||||
// FIXME: Generate a better nonce scheme.
|
||||
snprintf(buf, 64, "%p%d%d", user, (int) user->id.sid, (int) user->connection->sd);
|
||||
snprintf(buf, 64, "%p%d%d", user, (int) user->id.sid, (int) net_con_get_sd(user->connection));
|
||||
|
||||
tiger((uint64_t*) buf, strlen(buf), (uint64_t*) tiger_res);
|
||||
base32_encode((unsigned char*) tiger_res, TIGERSIZE, tiger_buf);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ void hub_disconnect_user(struct hub_info* hub, struct hub_user* user, int reason
|
||||
}
|
||||
|
||||
/* stop reading from user */
|
||||
net_shutdown_r(user->connection->sd);
|
||||
net_shutdown_r(net_con_get_sd(user->connection));
|
||||
net_con_close(user->connection);
|
||||
user->connection = 0;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ static char probe_recvbuf[PROBE_RECV_SIZE];
|
||||
|
||||
static void probe_net_event(struct net_connection* con, int events, void *arg)
|
||||
{
|
||||
struct hub_probe* probe = (struct hub_probe*) con->ptr;
|
||||
struct hub_probe* probe = (struct hub_probe*) net_con_get_ptr(con);
|
||||
|
||||
if (events == NET_EVENT_SOCKERROR || events == NET_EVENT_CLOSED || events == NET_EVENT_TIMEOUT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user