void SES_pool_accept_task(struct worker *wrk, void *arg) { struct sesspool *pp; struct sess *sp; const char *lsockname; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CAST_OBJ_NOTNULL(pp, arg, SESSPOOL_MAGIC); /* Turn accepted socket into a session */ AN(wrk->aws->r); sp = ses_new(pp); if (sp == NULL) { VCA_FailSess(wrk); return; } wrk->stats->s_sess++; sp->t_open = VTIM_real(); sp->t_idle = sp->t_open; sp->vxid = VXID_Get(wrk, VSL_CLIENTMARKER); lsockname = VCA_SetupSess(wrk, sp); ses_vsl_socket(sp, lsockname); ses_sess_pool_task(wrk, sp); }
void SES_pool_accept_task(struct worker *wrk, void *arg) { struct sesspool *pp; struct sess *sp; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CAST_OBJ_NOTNULL(pp, arg, SESSPOOL_MAGIC); /* Turn accepted socket into a session */ AN(wrk->aws->r); sp = ses_new(pp); if (sp == NULL) { VCA_FailSess(wrk); } else { VCA_SetupSess(wrk, sp); sp->step = STP_FIRST; ses_pool_task(wrk, sp); } }