]> err.no Git - varnish/commitdiff
use miniobj on srcaddr's
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 21:14:29 +0000 (21:14 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 16 Sep 2006 21:14:29 +0000 (21:14 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1037 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_session.c

index 4b6b8d9fe9a4a12c7bfcbc2a12b76f5e82c02df9..a20c67445b2dd863557ab7ff088cfb54a3d0be58 100644 (file)
@@ -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);