Latest update - 7393

This commit is contained in:
2018-11-14 10:59:43 +09:00
parent 7781c82339
commit 9eb95c7f35
3 changed files with 121 additions and 43 deletions
+1
View File
@@ -507,6 +507,7 @@ void ngx_event_accept(ngx_event_t *ev);
void ngx_event_recvmsg(ngx_event_t *ev);
void ngx_udp_rbtree_insert_value(ngx_rbtree_node_t *temp,
ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel);
void ngx_delete_udp_connection(void *data);
ngx_int_t ngx_trylock_accept_mutex(ngx_cycle_t *cycle);
ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle);
u_char *ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len);
+19 -3
View File
@@ -25,7 +25,6 @@ struct ngx_udp_connection_s {
static ssize_t ngx_udp_shared_recv(ngx_connection_t *c, u_char *buf,
size_t size);
static ngx_int_t ngx_insert_udp_connection(ngx_connection_t *c);
static void ngx_delete_udp_connection(void *data);
static ngx_connection_t *ngx_lookup_udp_connection(ngx_listening_t *ls,
struct sockaddr *sockaddr, socklen_t socklen,
struct sockaddr *local_sockaddr, socklen_t local_socklen);
@@ -263,7 +262,10 @@ ngx_event_recvmsg(ngx_event_t *ev)
rev->handler(rev);
c->udp->buffer = NULL;
if (c->udp) {
c->udp->buffer = NULL;
}
rev->ready = 0;
goto next;
@@ -540,12 +542,18 @@ ngx_insert_udp_connection(ngx_connection_t *c)
}
static void
void
ngx_delete_udp_connection(void *data)
{
ngx_connection_t *c = data;
if (c->udp == NULL) {
return;
}
ngx_rbtree_delete(&c->listening->rbtree, &c->udp->node);
c->udp = NULL;
}
@@ -573,6 +581,14 @@ ngx_lookup_udp_connection(ngx_listening_t *ls, struct sockaddr *sockaddr,
}
}
#else
void
ngx_delete_udp_connection(void *data)
{
return;
}
#endif
node = ls->rbtree.root;