conn->owner = owner;
}
-/* prepares a connection with the appropriate data, ctrl, transport layers, and
- * owner. The transport state and context are set to 0.
- */
-static inline void conn_prepare(struct connection *conn, const struct data_cb *data,
- const struct protocol *ctrl, const struct xprt_ops *xprt,
- void *owner)
-{
- conn_assign(conn, data, ctrl, xprt, owner);
- conn->xprt_st = 0;
- conn->xprt_ctx = NULL;
-}
-
/* returns a human-readable error code for conn->err_code, or NULL if the code
* is unknown.
*/
si->ops = &si_conn_ops;
si->end = &conn->obj_type;
- conn_prepare(conn, &si_conn_cb, ctrl, xprt, si);
+ conn_assign(conn, &si_conn_cb, ctrl, xprt, si);
}
/* Assign the stream interface's pre-allocated connection to the end point,
/* prepare a new connection */
conn_init(conn);
- conn_prepare(conn, &check_conn_cb, s->check_common.proto, s->check_common.xprt, check);
+ conn_assign(conn, &check_conn_cb, s->check_common.proto, s->check_common.xprt, check);
conn->target = &s->obj_type;
/* no client address */
* but not initialized. Also note we need to be careful as the stream
* int is not initialized yet.
*/
- conn_prepare(cli_conn, &sess_conn_cb, l->proto, l->xprt, s);
+ conn_assign(cli_conn, &sess_conn_cb, l->proto, l->xprt, s);
/* finish initialization of the accepted file descriptor */
fd_insert(cfd);