|
|
|
@ -95,7 +95,7 @@ static void exit_handle_data(struct ETCP_CONN* conn, struct ll_entry* entry) { |
|
|
|
socket_set_nonblocking(f->sock); |
|
|
|
socket_set_nonblocking(f->sock); |
|
|
|
struct sockaddr_in bind_addr = {.sin_family = AF_INET, .sin_addr = {.s_addr = INADDR_ANY}, .sin_port = 0}; |
|
|
|
struct sockaddr_in bind_addr = {.sin_family = AF_INET, .sin_addr = {.s_addr = INADDR_ANY}, .sin_port = 0}; |
|
|
|
bind(f->sock, (struct sockaddr*)&bind_addr, sizeof(bind_addr)); |
|
|
|
bind(f->sock, (struct sockaddr*)&bind_addr, sizeof(bind_addr)); |
|
|
|
f->read_id = uasync_add_socket(g_udp_ctx->ua, f->sock, flow_read_cb, NULL, NULL, f); |
|
|
|
f->read_id = uasync_add_socket_t(g_udp_ctx->ua, f->sock, flow_read_cb, NULL, NULL, f); |
|
|
|
if (!f->read_id) { socket_close_wrapper(f->sock); u_free(f); goto drop; } |
|
|
|
if (!f->read_id) { socket_close_wrapper(f->sock); u_free(f); goto drop; } |
|
|
|
f->next = g_udp_ctx->flows; g_udp_ctx->flows = f; g_udp_ctx->flow_count++; |
|
|
|
f->next = g_udp_ctx->flows; g_udp_ctx->flows = f; g_udp_ctx->flow_count++; |
|
|
|
if (!g_udp_ctx->expire_timer) |
|
|
|
if (!g_udp_ctx->expire_timer) |
|
|
|
|