r4496 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jan 27 16:59:30 CET 2010
Author: phk
Date: 2010-01-27 16:59:30 +0100 (Wed, 27 Jan 2010)
New Revision: 4496
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_pool.c
Log:
Give WRK_QueueSession() a return value that tells if the session
as indeed queued or if it was dropped.
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2010-01-27 15:14:50 UTC (rev 4495)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2010-01-27 15:59:30 UTC (rev 4496)
@@ -595,7 +595,7 @@
/* 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);
Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c 2010-01-27 15:14:50 UTC (rev 4495)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2010-01-27 15:59:30 UTC (rev 4496)
@@ -298,7 +298,7 @@
/*--------------------------------------------------------------------*/
-void
+int
WRK_QueueSession(struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
@@ -306,7 +306,7 @@
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 @@
VCL_Rel(&sp->vcl);
}
SES_Delete(sp);
+ return (1);
}
/*--------------------------------------------------------------------
More information about the varnish-commit
mailing list