MINOR: protocol: remove the redundant ->sock_domain field
This field used to be needed before commit 2b5e0d8b6 ("MEDIUM: proto_udp:
replace last AF_CUST_UDP* with AF_INET*") as it was used as a protocol
entry selector. Since this commit it's always equal to the socket family's
value so it's entirely redundant. Let's remove it now to simplify the
protocol definition a little bit.
diff --git a/src/protocol.c b/src/protocol.c
index 8ea36cb..cb9f6e7 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -37,8 +37,8 @@
{
HA_SPIN_LOCK(PROTO_LOCK, &proto_lock);
LIST_ADDQ(&protocols, &proto->list);
- if (proto->sock_domain >= 0 && proto->sock_domain < AF_CUST_MAX)
- __protocol_by_family[proto->sock_domain]
+ if (proto->fam->sock_domain >= 0 && proto->fam->sock_domain < AF_CUST_MAX)
+ __protocol_by_family[proto->fam->sock_domain]
[proto->sock_type == SOCK_DGRAM]
[proto->ctrl_type == SOCK_DGRAM] = proto;
HA_SPIN_UNLOCK(PROTO_LOCK, &proto_lock);