diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h index 418fc8392..9505a87b9 100644 --- a/include/proto/stream_interface.h +++ b/include/proto/stream_interface.h @@ -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) {