From: phk Date: Sat, 16 Sep 2006 21:14:29 +0000 (+0000) Subject: use miniobj on srcaddr's X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad800dc00f5a2c321d65f7477818126f0befdfde;p=varnish use miniobj on srcaddr's git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1037 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_session.c b/varnish-cache/bin/varnishd/cache_session.c index 4b6b8d9f..a20c6744 100644 --- a/varnish-cache/bin/varnishd/cache_session.c +++ b/varnish-cache/bin/varnishd/cache_session.c @@ -146,6 +146,7 @@ SES_RefSrcAddr(struct sess *sp) if (c3 != NULL) { memset(c3, 0, sizeof *c3); strcpy(c3->addr, sp->addr); + c3->magic = SRCADDR_MAGIC; c3->hash = u; c3->acct.first = now; c3->ttl = now + params->srcaddr_ttl; @@ -167,6 +168,7 @@ ses_relsrcaddr(struct sess *sp) if (sp->srcaddr == NULL) return; + CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); ch = sp->srcaddr->sah; CHECK_OBJ(ch, SRCADDRHEAD_MAGIC); LOCK(&ch->mtx); @@ -202,6 +204,7 @@ SES_Charge(struct sess *sp) ses_sum_acct(&sp->acct, a); if (sp->srcaddr != NULL) { + CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); LOCK(&sp->srcaddr->sah->mtx); b = &sp->srcaddr->acct; ses_sum_acct(b, a);