Commit 2a08bde0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

If we fail to enqueue a session because all threadpools are filled

we drop the session before we have rendered the clients address.

Report IP and port as "-" rather than passing NULL pointers, which
is not nice under any, and core dump solaris under some circumstances.

Fixes:	#598



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5225 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2be65dda
......@@ -250,6 +250,7 @@ SES_Delete(struct sess *sp)
{
struct acct *b = &sp->acct_ses;
struct sessmem *sm;
static char noaddr[] = "-";
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
sm = sp->mem;
......@@ -260,6 +261,10 @@ SES_Delete(struct sess *sp)
VSC_main->n_sess--; /* XXX: locking ? */
assert(!isnan(b->first));
assert(!isnan(sp->t_end));
if (sp->addr == NULL)
sp->addr = noaddr;
if (sp->port == NULL)
sp->port = noaddr;
VSL(SLT_StatSess, sp->id, "%s %s %.0f %ju %ju %ju %ju %ju %ju %ju",
sp->addr, sp->port, sp->t_end - b->first,
b->sess, b->req, b->pipe, b->pass,
......
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