CLEANUP: stream-int: rename si_reset() to si_init()
si_reset() function is only used when a stream-interface is allocated. Thus rename it to si_init() insteaad.
This commit is contained in:
parent
cda94accb1
commit
014ac35eb2
@ -94,11 +94,10 @@ static inline struct stream_interface *si_opposite(struct stream_interface *si)
|
|||||||
return ((si->flags & SI_FL_ISBACK) ? cs_strm(si->cs)->csf->si : cs_strm(si->cs)->csb->si);
|
return ((si->flags & SI_FL_ISBACK) ? cs_strm(si->cs)->csf->si : cs_strm(si->cs)->csb->si);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* initializes a stream interface in the SI_ST_INI state. It's detached from
|
/* initializes a stream interface in the SI_ST_INI state and create the event
|
||||||
* any endpoint and only keeps its side which is expected to have already been
|
* tasklet.
|
||||||
* set.
|
|
||||||
*/
|
*/
|
||||||
static inline int si_reset(struct stream_interface *si)
|
static inline int si_init(struct stream_interface *si)
|
||||||
{
|
{
|
||||||
si->src = NULL;
|
si->src = NULL;
|
||||||
si->dst = NULL;
|
si->dst = NULL;
|
||||||
|
@ -111,7 +111,7 @@ struct stream_interface *si_new(struct conn_stream *cs)
|
|||||||
if (unlikely(!si))
|
if (unlikely(!si))
|
||||||
return NULL;
|
return NULL;
|
||||||
si->flags = SI_FL_NONE;
|
si->flags = SI_FL_NONE;
|
||||||
if (si_reset(si) < 0) {
|
if (si_init(si) < 0) {
|
||||||
pool_free(pool_head_streaminterface, si);
|
pool_free(pool_head_streaminterface, si);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user