X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fviced%2Fhost.c;h=79d3fe35beca1cce297c86e4937fc0190daaff2f;hp=0cda0be6c7658d801988247f85bf5e5dfab58b6d;hb=c5d97c62c819b5e36c6145deb77a5ee003ef8cd9;hpb=c5c521af0ed944a71f74a316bd51a81636ce2818 diff --git a/src/viced/host.c b/src/viced/host.c index 0cda0be..79d3fe3 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -114,8 +114,10 @@ static void GetCEBlock() register int i; block = (struct CEBlock *)malloc(sizeof(struct CEBlock)); - if (!block) + if (!block) { + ViceLog(0, ("Failed malloc in GetCEBlock\n")); ShutDownAndCore(PANIC); + } for(i = 0; i < (CESPERBLOCK -1); i++) { Lock_Init(&block->entry[i].lock); @@ -137,8 +139,10 @@ static struct client *GetCE() if (CEFree == 0) GetCEBlock(); - if (CEFree == 0) + if (CEFree == 0) { + ViceLog(0, ("CEFree NULL in GetCE\n")); ShutDownAndCore(PANIC); + } entry = CEFree; CEFree = entry->next; @@ -193,8 +197,10 @@ static void GetHTBlock() static int index = 0; block = (struct HTBlock *)malloc(sizeof(struct HTBlock)); - if (!block) + if (!block) { + ViceLog(0, ("Failed malloc in GetHTBlock\n")); ShutDownAndCore(PANIC); + } #ifdef AFS_PTHREAD_ENV for(i=0; i < (h_HTSPERBLOCK); i++) @@ -1590,8 +1596,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 +1615,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;