]> err.no Git - varnish/commitdiff
Refine the debugging string: we don't really need the XID, but we do need
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 30 Oct 2007 14:40:55 +0000 (14:40 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 30 Oct 2007 14:40:55 +0000 (14:40 +0000)
the thread ID in order to locate the correct thread in gdb.  Furthermore,
we must use VSL rather than WSL since the session might actually not have
a worker at that point; but if it does, make sure to flush the log first.

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

varnish-cache/bin/varnishd/cache_center.c

index f92d74b9bdacc0c6ff9fa75bbf8964db27a49dea..eda2efd7039e6136e6674228fb6ac0aa8a131a1d 100644 (file)
@@ -880,10 +880,11 @@ CNT_Session(struct sess *sp)
 #ifdef DIAGNOSTICS
 #define STEP(l,u) \
                    case STP_##u: \
-                       WSL(sp->wrk, SLT_Debug, sp->id, \
-                           "cnt_%s(%p) xid %x obj %p vcl %p", \
-                           #l, sp, sp->xid, sp->obj, sp->vcl); \
-                       WSL_Flush(sp->wrk); \
+                       if (sp->wrk) \
+                               WSL_Flush(sp->wrk); \
+                       VSL(SLT_Debug, sp->id, \
+                           "thr %p STP_%s sp %p obj %p vcl %p", \
+                           pthread_self(), #u, sp, sp->obj, sp->vcl); \
                        done = cnt_##l(sp); \
                        break;
 #else