MINOR: stream-int: retrieve session pointer from stream-int

sess_from_si() does this via the owner (struct task). It works because
all stream ints belong to a task nowadays.
This commit is contained in:
Willy Tarreau 2014-11-28 18:30:25 +01:00
parent a885f6dc65
commit 3dd6a25323
1 changed files with 6 additions and 0 deletions

View File

@ -347,6 +347,12 @@ static inline int si_connect(struct stream_interface *si)
return ret;
}
/* finds the session which owns a stream interface */
static inline struct session *si_sess(struct stream_interface *si)
{
return (struct session *)((struct task *)si->owner)->context;
}
/* for debugging, reports the stream interface state name */
static inline const char *si_state_str(int state)
{