From: des Date: Tue, 30 Oct 2007 14:40:55 +0000 (+0000) Subject: Refine the debugging string: we don't really need the XID, but we do need X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e562230d8d86eb47a8dfdd8fee5d1639c290cec;p=varnish Refine the debugging string: we don't really need the XID, but we do need 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 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index f92d74b9..eda2efd7 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -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