MINOR: protocol: rename the ->listeners field to ->receivers

Since the listeners were split into receiver+listener, this field ought
to have been renamed because it's confusing. It really links receivers
and not listeners, as most of the time it's used via rx.proto_list!
The nb_listeners field was updated accordingly.
This commit is contained in:
Willy Tarreau
2020-09-25 17:01:43 +02:00
parent dae0692717
commit d7f331c8b8
7 changed files with 32 additions and 32 deletions

View File

@@ -71,7 +71,7 @@ int protocol_bind_all(int verbose)
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
list_for_each_entry(receiver, &proto->listeners, proto_list) {
list_for_each_entry(receiver, &proto->receivers, proto_list) {
listener = LIST_ELEM(receiver, struct listener *, rx);
/* FIXME: horrible hack, we don't have a way to register
@@ -144,7 +144,7 @@ int protocol_unbind_all(void)
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
list_for_each_entry(listener, &proto->listeners, rx.proto_list)
list_for_each_entry(listener, &proto->receivers, rx.proto_list)
unbind_listener(listener);
}
HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);
@@ -165,7 +165,7 @@ int protocol_pause_all(void)
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
list_for_each_entry(listener, &proto->listeners, rx.proto_list)
list_for_each_entry(listener, &proto->receivers, rx.proto_list)
if (!pause_listener(listener))
err |= ERR_FATAL;
}
@@ -187,7 +187,7 @@ int protocol_resume_all(void)
err = 0;
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
list_for_each_entry(listener, &proto->listeners, rx.proto_list)
list_for_each_entry(listener, &proto->receivers, rx.proto_list)
if (!resume_listener(listener))
err |= ERR_FATAL;
}
@@ -206,7 +206,7 @@ int protocol_enable_all(void)
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
list_for_each_entry(proto, &protocols, list) {
list_for_each_entry(listener, &proto->listeners, rx.proto_list)
list_for_each_entry(listener, &proto->receivers, rx.proto_list)
enable_listener(listener);
}
HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);