REORG: listener: move the listener's proto to the receiver
The receiver is the one which depends on the protocol while the listener
relies on the receiver. Let's move the protocol there. Since there's also
a list element to get back to the listener from the proto list, this list
element (proto_list) was moved as well. For now when scanning protos, we
still see listeners which are linked by their rx.proto_list part.
diff --git a/src/protocol.c b/src/protocol.c
index a942e44..bf1b1c5 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -66,7 +66,7 @@
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
- list_for_each_entry(listener, &proto->listeners, proto_list) {
+ list_for_each_entry(listener, &proto->listeners, rx.proto_list) {
lerr = proto->bind(listener, msg, sizeof(msg));
/* errors are reported if <verbose> is set or if they are fatal */
@@ -106,7 +106,7 @@
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
- list_for_each_entry(listener, &proto->listeners, proto_list)
+ list_for_each_entry(listener, &proto->listeners, rx.proto_list)
unbind_listener(listener);
}
HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);