From 5f002d755ff25f976f50c8e4d976f28caa245751 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Love=20H=C3=B6rnquist-=C3=85strand?= Date: Fri, 5 Oct 2001 22:10:54 +0000 Subject: [PATCH] viced-hosts-dump-make-output-more-useful-for-holds-20011005 don't just print pointer to holds array --- src/viced/host.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index 0cda0be6c..f2048d23d 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1590,8 +1590,8 @@ static int h_DumpHost(host, held, file) char tmpStr[256]; H_LOCK - sprintf(tmpStr, "ip:%x holds:%d port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [", - host->host, host->holds, host->port, host->index, host->cblist, + sprintf(tmpStr, "ip:%x port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [", + host->host, host->port, host->index, host->cblist, CheckLock(&host->lock), host->LastCall, host->ActiveCall, (host->hostFlags & VENUSDOWN), host->hostFlags&HOSTDELETED, host->Console, host->hostFlags & CLIENTDELETED, @@ -1609,8 +1609,16 @@ static int h_DumpHost(host, held, file) sprintf(tmpStr, " %x", host->interface->addr[i]); STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); } - sprintf(tmpStr, "]\n"); + sprintf(tmpStr, "] holds: "); STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); + + for (i = 0 ; i < h_maxSlots ; i++) { + sprintf(tmpStr, "%04x", host->holds[i]); + STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); + } + sprintf(tmpStr, " slot/bit: %d/%d\n", h_holdSlot(), h_holdbit()); + STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file); + H_UNLOCK return held; -- 2.39.5