MINOR: sink: Add a ref to sink in the sink_forward_target structure
This change is required to be able to refactor the init stage of appctx. It is now possible to directly get the sink from a forward target.
This commit is contained in:
parent
b1e0836ecf
commit
2ae25ea24b
|
@ -40,6 +40,7 @@ struct sink_forward_target {
|
|||
struct server *srv; // used server
|
||||
struct appctx *appctx; // appctx of current session
|
||||
size_t ofs; // ring buffer reader offset
|
||||
struct sink *sink; // the associated sink
|
||||
struct sink_forward_target *next;
|
||||
__decl_thread(HA_SPINLOCK_T lock); // lock to protect current struct
|
||||
};
|
||||
|
|
|
@ -1005,6 +1005,7 @@ struct sink *sink_new_from_logsrv(struct logsrv *logsrv)
|
|||
/* insert into sink_forward_targets
|
||||
* list into sink
|
||||
*/
|
||||
sft->sink = sink;
|
||||
sft->next = sink->sft;
|
||||
sink->sft = sft;
|
||||
|
||||
|
|
Loading…
Reference in New Issue