struct shared_table *tables;
struct server *srv;
struct dcache *dcache; /* dictionary cache */
+ struct peers *peers; /* associated peer section */
struct peer *next; /* next peer in the list */
};
const struct peer *peer = a2;
struct peers *peers = NULL;
- if (peer->appctx) {
- struct stream *s = appctx_strm(peer->appctx);
-
- peers = strm_fe(s)->parent;
- }
+ if (peer->appctx)
+ peers = peer->peers;
if (peers)
chunk_appendf(&trace_buf, " %s", peers->local->id);
*/
void __peer_session_deinit(struct peer *peer)
{
- struct stream *s;
- struct peers *peers;
-
- if (!peer->appctx)
- return;
-
- s = appctx_strm(peer->appctx);
+ struct peers *peers = peer->peers;
- peers = strm_fe(s)->parent;
- if (!peers)
+ if (!peers || !peer->appctx)
return;
if (peer->appctx->st0 == PEER_SESS_ST_WAITMSG)
static inline int peer_treat_awaited_msg(struct appctx *appctx, struct peer *peer, unsigned char *msg_head,
char **msg_cur, char *msg_end, int msg_len, int totl)
{
- struct stream *s = appctx_strm(appctx);
- struct peers *peers = strm_fe(s)->parent;
+ struct peers *peers = peer->peers;
if (msg_head[0] == PEER_MSG_CLASS_CONTROL) {
if (msg_head[1] == PEER_MSG_CTRL_RESYNCREQ) {