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:
Willy Tarreau 2019-05-13 18:27:59 +02:00
parent 88bdba31fa
commit 8bdb5c9bb4
3 changed files with 0 additions and 6 deletions

View File

@ -57,7 +57,6 @@ enum sub_event_type {
struct wait_event {
struct tasklet *task;
void *handle; /* To be used by the callee */
int events; /* set of enum sub_event_type above */
};

View File

@ -2207,7 +2207,6 @@ static int h1_subscribe(struct conn_stream *cs, int event_type, void *param)
sw = param;
if (!(sw->events & SUB_RETRY_RECV)) {
sw->events |= SUB_RETRY_RECV;
sw->handle = h1s;
h1s->recv_wait = sw;
}
return 0;
@ -2215,7 +2214,6 @@ static int h1_subscribe(struct conn_stream *cs, int event_type, void *param)
sw = param;
if (!(sw->events & SUB_RETRY_SEND)) {
sw->events |= SUB_RETRY_SEND;
sw->handle = h1s;
h1s->send_wait = sw;
}
return 0;

View File

@ -909,7 +909,6 @@ static struct h2s *h2s_new(struct h2c *h2c, int id)
h2s->recv_wait = NULL;
h2s->wait_event.task->process = h2_deferred_shut;
h2s->wait_event.task->context = h2s;
h2s->wait_event.handle = NULL;
h2s->wait_event.events = 0;
LIST_INIT(&h2s->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;
if (!(sw->events & SUB_RETRY_RECV)) {
sw->events |= SUB_RETRY_RECV;
sw->handle = h2s;
h2s->recv_wait = sw;
}
event_type &= ~SUB_RETRY_RECV;
@ -5197,7 +5195,6 @@ static int h2_subscribe(struct conn_stream *cs, int event_type, void *param)
sw = param;
if (!(sw->events & SUB_RETRY_SEND)) {
sw->events |= SUB_RETRY_SEND;
sw->handle = h2s;
h2s->send_wait = sw;
if (!(h2s->flags & H2_SF_BLK_SFCTL) &&
!LIST_ADDED(&h2s->list)) {