From 3e562230d8d86eb47a8dfdd8fee5d1639c290cec Mon Sep 17 00:00:00 2001 From: des Date: Tue, 30 Oct 2007 14:40:55 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_center.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.5