]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: remove the handle field from the wait_event struct
authorWilly Tarreau <w@1wt.eu>
Mon, 13 May 2019 16:27:59 +0000 (18:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 May 2019 17:14:52 +0000 (19:14 +0200)
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.

include/types/connection.h
src/mux_h1.c
src/mux_h2.c

index 308be7d7f74f2e77a80a0c87c6551d6dcd4f2ed0..be590f098c9a0a5030274ca7c46ea6635aac99f8 100644 (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 */
 };
 
index d91f45d781d7e36f02a2a4c9ebc8b24d14c52b9b..e3f104f49d172c3ed2b31ff04499bf204f6b9348 100644 (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;
index f5a153170c18c20b7024faf5356f35412bb20227..8c73cce45dec40da60ec0702c9e46b4eb2db9394 100644 (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)) {