Commit 953bf626 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Give WRK_QueueSession() a return value that tells if the session

as indeed queued or if it was dropped.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4496 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent bc5cb2ef
......@@ -595,7 +595,7 @@ void PipeSession(struct sess *sp);
/* cache_pool.c */
void WRK_Init(void);
int WRK_Queue(struct workreq *wrq);
void WRK_QueueSession(struct sess *sp);
int WRK_QueueSession(struct sess *sp);
void WRK_SumStat(struct worker *w);
void WRW_Reserve(struct worker *w, int *fd);
......
......@@ -298,7 +298,7 @@ wrk_do_cnt_sess(struct worker *w, void *priv)
/*--------------------------------------------------------------------*/
void
int
WRK_QueueSession(struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
......@@ -306,7 +306,7 @@ WRK_QueueSession(struct sess *sp)
sp->workreq.func = wrk_do_cnt_sess;
sp->workreq.priv = sp;
if (WRK_Queue(&sp->workreq) == 0)
return;
return (0);
/*
* Couldn't queue it -- kill it.
......@@ -324,6 +324,7 @@ WRK_QueueSession(struct sess *sp)
VCL_Rel(&sp->vcl);
}
SES_Delete(sp);
return (1);
}
/*--------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment