*/
int conn_session_complete(struct connection *conn, int flag)
{
- struct session *s = container_of(conn, struct session, si[0].conn);
+ struct session *s = container_of(conn->owner, struct session, si[0]);
if (!(conn->flags & CO_FL_ERROR) && (session_complete(s) > 0)) {
conn->flags &= ~flag;
*/
int conn_si_send_proxy(struct connection *conn, unsigned int flag)
{
- struct stream_interface *si = container_of(conn, struct stream_interface, conn);
+ struct stream_interface *si = conn->owner;
/* we might have been called just after an asynchronous shutw */
if (conn->flags & CO_FL_SOCK_WR_SH)
*/
void conn_notify_si(struct connection *conn)
{
- struct stream_interface *si = container_of(conn, struct stream_interface, conn);
+ struct stream_interface *si = conn->owner;
DPRINTF(stderr, "%s: si=%p, si->state=%d ib->flags=%08x ob->flags=%08x\n",
__FUNCTION__,
*/
static int si_conn_send_loop(struct connection *conn)
{
- struct stream_interface *si = container_of(conn, struct stream_interface, conn);
+ struct stream_interface *si = conn->owner;
struct channel *b = si->ob;
int write_poll = MAX_WRITE_POLL_LOOPS;
int ret;
*/
void si_conn_recv_cb(struct connection *conn)
{
- struct stream_interface *si = container_of(conn, struct stream_interface, conn);
+ struct stream_interface *si = conn->owner;
struct channel *b = si->ib;
int ret, max, cur_read;
int read_poll = MAX_READ_POLL_LOOPS;
*/
void si_conn_send_cb(struct connection *conn)
{
- struct stream_interface *si = container_of(conn, struct stream_interface, conn);
+ struct stream_interface *si = conn->owner;
struct channel *b = si->ob;
if (conn->flags & CO_FL_ERROR)