mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
CLEANUP: connection: remove the handle field from the wait_event struct
It was only set and not consumed after the previous change. The reason is that the task's context always contains the relevant information, so there is no need for a second pointer.
This commit is contained in:
parent
88bdba31fa
commit
8bdb5c9bb4
@ -57,7 +57,6 @@ enum sub_event_type {
|
|||||||
|
|
||||||
struct wait_event {
|
struct wait_event {
|
||||||
struct tasklet *task;
|
struct tasklet *task;
|
||||||
void *handle; /* To be used by the callee */
|
|
||||||
int events; /* set of enum sub_event_type above */
|
int events; /* set of enum sub_event_type above */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2207,7 +2207,6 @@ static int h1_subscribe(struct conn_stream *cs, int event_type, void *param)
|
|||||||
sw = param;
|
sw = param;
|
||||||
if (!(sw->events & SUB_RETRY_RECV)) {
|
if (!(sw->events & SUB_RETRY_RECV)) {
|
||||||
sw->events |= SUB_RETRY_RECV;
|
sw->events |= SUB_RETRY_RECV;
|
||||||
sw->handle = h1s;
|
|
||||||
h1s->recv_wait = sw;
|
h1s->recv_wait = sw;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -2215,7 +2214,6 @@ static int h1_subscribe(struct conn_stream *cs, int event_type, void *param)
|
|||||||
sw = param;
|
sw = param;
|
||||||
if (!(sw->events & SUB_RETRY_SEND)) {
|
if (!(sw->events & SUB_RETRY_SEND)) {
|
||||||
sw->events |= SUB_RETRY_SEND;
|
sw->events |= SUB_RETRY_SEND;
|
||||||
sw->handle = h1s;
|
|
||||||
h1s->send_wait = sw;
|
h1s->send_wait = sw;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -909,7 +909,6 @@ static struct h2s *h2s_new(struct h2c *h2c, int id)
|
|||||||
h2s->recv_wait = NULL;
|
h2s->recv_wait = NULL;
|
||||||
h2s->wait_event.task->process = h2_deferred_shut;
|
h2s->wait_event.task->process = h2_deferred_shut;
|
||||||
h2s->wait_event.task->context = h2s;
|
h2s->wait_event.task->context = h2s;
|
||||||
h2s->wait_event.handle = NULL;
|
|
||||||
h2s->wait_event.events = 0;
|
h2s->wait_event.events = 0;
|
||||||
LIST_INIT(&h2s->list);
|
LIST_INIT(&h2s->list);
|
||||||
LIST_INIT(&h2s->sending_list);
|
LIST_INIT(&h2s->sending_list);
|
||||||
@ -5188,7 +5187,6 @@ static int h2_subscribe(struct conn_stream *cs, int event_type, void *param)
|
|||||||
sw = param;
|
sw = param;
|
||||||
if (!(sw->events & SUB_RETRY_RECV)) {
|
if (!(sw->events & SUB_RETRY_RECV)) {
|
||||||
sw->events |= SUB_RETRY_RECV;
|
sw->events |= SUB_RETRY_RECV;
|
||||||
sw->handle = h2s;
|
|
||||||
h2s->recv_wait = sw;
|
h2s->recv_wait = sw;
|
||||||
}
|
}
|
||||||
event_type &= ~SUB_RETRY_RECV;
|
event_type &= ~SUB_RETRY_RECV;
|
||||||
@ -5197,7 +5195,6 @@ static int h2_subscribe(struct conn_stream *cs, int event_type, void *param)
|
|||||||
sw = param;
|
sw = param;
|
||||||
if (!(sw->events & SUB_RETRY_SEND)) {
|
if (!(sw->events & SUB_RETRY_SEND)) {
|
||||||
sw->events |= SUB_RETRY_SEND;
|
sw->events |= SUB_RETRY_SEND;
|
||||||
sw->handle = h2s;
|
|
||||||
h2s->send_wait = sw;
|
h2s->send_wait = sw;
|
||||||
if (!(h2s->flags & H2_SF_BLK_SFCTL) &&
|
if (!(h2s->flags & H2_SF_BLK_SFCTL) &&
|
||||||
!LIST_ADDED(&h2s->list)) {
|
!LIST_ADDED(&h2s->list)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user