mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
MINOR: receiver: link the receiver to its settings
Just like listeners keep a pointer to their bind_conf, receivers now also have a pointer to their rx_settings. All those belonging to a listener are automatically initialized with a pointer to the bind_conf's settings.
This commit is contained in:
parent
d45693d85c
commit
0fce6bce34
@ -47,6 +47,7 @@ struct receiver {
|
||||
int fd; /* handle we receive from (fd only for now) */
|
||||
unsigned int flags; /* receiver options (RX_F_*) */
|
||||
struct protocol *proto; /* protocol this receiver belongs to */
|
||||
struct rx_settings *settings; /* points to the settings used by this receiver */
|
||||
struct list proto_list; /* list in the protocol header */
|
||||
/* warning: this struct is huge, keep it at the bottom */
|
||||
struct sockaddr_storage addr; /* the address the socket is bound to */
|
||||
|
@ -563,7 +563,7 @@ int create_listeners(struct bind_conf *bc, const struct sockaddr_storage *ss,
|
||||
LIST_ADDQ(&bc->frontend->conf.listeners, &l->by_fe);
|
||||
LIST_ADDQ(&bc->listeners, &l->by_bind);
|
||||
l->bind_conf = bc;
|
||||
|
||||
l->rx.settings = &bc->settings;
|
||||
l->rx.fd = fd;
|
||||
memcpy(&l->rx.addr, ss, sizeof(*ss));
|
||||
MT_LIST_INIT(&l->wait_queue);
|
||||
|
Loading…
Reference in New Issue
Block a user