]> err.no Git - varnish/commitdiff
Remove the session-specific assert facility, the general assert facility
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Jul 2008 11:28:40 +0000 (11:28 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Jul 2008 11:28:40 +0000 (11:28 +0000)
dumps details now.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2976 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_acceptor_kqueue.c
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_response.c
varnish-cache/bin/varnishd/cache_session.c

index 689f61f894ed3f716b26f02d6180c4b860778760..43429e1b7617da5426474e36a1c1c220541813b3 100644 (file)
@@ -710,19 +710,3 @@ Tadd(txt *t, const char *p, int l)
                t->b = t->e;
        }
 }
-
-#ifdef WITHOUT_ASSERTS
-#define spassert(cond) ((void)(cond))
-#else
-void panic(const char *, int, const char *,
-    const struct sess *, const char *, ...);
-#define spassert(cond)                                         \
-       do {                                                    \
-               int ok = !!(cond);                              \
-               if (!ok)                                        \
-                       panic(__FILE__, __LINE__, __func__, sp, \
-                           "assertion failed: %s\n", #cond);   \
-       } while (0)
-#endif
-#define SPAZ(val) spassert((val) == 0)
-#define SPAN(val) spassert((val) != 0)
index eb5cb67f42657fb38e2b8a8db7bb9c1293214d38..3cf319b937356d293687822962b3d8f1563c275a 100644 (file)
@@ -119,8 +119,8 @@ vca_kev(const struct kevent *kp)
            sp, (unsigned long)kp->data, kp->flags,
            (kp->flags & EV_EOF) ? " EOF" : "");
 
-       spassert(sp->id == kp->ident);
-       spassert(sp->fd == sp->id);
+       assert(sp->id == kp->ident);
+       assert(sp->fd == sp->id);
        if (kp->data > 0) {
                i = HTC_Rx(sp->htc);
                if (i == 0) {
index 37414481bf8221c9980b5893fa27cb90420b94e8..aff6b1da8a3cf4db448859bcaddaead8c7c90ca0 100644 (file)
@@ -574,7 +574,7 @@ cnt_lookup(struct sess *sp)
                 * We hit a busy object, disembark worker thread and expect
                 * hash code to restart us, still in STP_LOOKUP, later.
                 */
-               spassert(sp->objhead != NULL);
+               assert(sp->objhead != NULL);
                if (params->diag_bitmap & 0x20)
                        WSP(sp, SLT_Debug,
                            "on waiting list <%s>", sp->objhead->hash);
index 46f329919ea8db997c38ed2fc29a0a6dd168c493..ed3e4185c25d2a9a109736207306ae28cf890fd8 100644 (file)
@@ -169,7 +169,7 @@ RES_WriteObj(struct sess *sp)
                        VSL_stats->n_objwrite++;
                        WRK_Write(sp->wrk, st->ptr, st->len);
                }
-               spassert(u == sp->obj->len);
+               assert(u == sp->obj->len);
                if (sp->esis > 0)
                        WRK_Write(sp->wrk, "\r\n", -1);
        }
index 268904a7f1906a1c3ee328adde5b1b3177869164..54792c0821e0bc03f9b019988630d2d14a837cac 100644 (file)
@@ -129,7 +129,7 @@ SES_RefSrcAddr(struct sess *sp)
                sp->srcaddr = NULL;
                return;
        }
-       SPAZ(sp->srcaddr);
+       AZ(sp->srcaddr);
        u = crc32_l(sp->addr, strlen(sp->addr));
        v = u % nsrchash;
        ch = &srchash[v];
@@ -329,8 +329,8 @@ SES_Delete(struct sess *sp)
        sm = sp->mem;
        CHECK_OBJ_NOTNULL(sm, SESSMEM_MAGIC);
 
-       SPAZ(sp->obj);
-       SPAZ(sp->vcl);
+       AZ(sp->obj);
+       AZ(sp->vcl);
        VSL_stats->n_sess--;
        ses_relsrcaddr(sp);
        assert(!isnan(b->first));