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.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 418fc83..9505a87 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -347,6 +347,12 @@
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)
{