diff --git a/conev.h b/conev.h index eed9079..4a8d928 100644 --- a/conev.h +++ b/conev.h @@ -68,7 +68,7 @@ struct buffer { struct eval { int fd; int index; - unsigned int mod_iter; + unsigned long long mod_iter; enum eid type; struct eval *pair; struct buffer buff; @@ -93,7 +93,7 @@ struct poolhd { #else struct pollfd *pevents; #endif - unsigned int iters; + unsigned long long iters; }; struct poolhd *init_pool(int count); diff --git a/proxy.c b/proxy.c index 8674131..c20f753 100644 --- a/proxy.c +++ b/proxy.c @@ -482,7 +482,7 @@ int udp_associate(struct poolhd *pool, return -1; } struct eval *client = add_event(pool, EV_UDP_TUNNEL, cfd, POLLIN); - if (!pair) { + if (!client) { del_event(pool, pair); close(cfd); return -1; @@ -880,7 +880,7 @@ int event_loop(int srvfd) } assert(val->type >= 0 && val->type < sizeof(eid_name)/sizeof(*eid_name)); - LOG(LOG_L, "new event: fd: %d, evt: %s, mod_iter: %d\n", val->fd, eid_name[val->type], val->mod_iter); + LOG(LOG_L, "new event: fd: %d, evt: %s, mod_iter: %llu\n", val->fd, eid_name[val->type], val->mod_iter); switch (val->type) { case EV_ACCEPT: