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:
parent
a885f6dc65
commit
3dd6a25323
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue