From c5d97c62c819b5e36c6145deb77a5ee003ef8cd9 Mon Sep 17 00:00:00 2001 From: Nathan Neulinger Date: Fri, 5 Oct 2001 22:25:24 +0000 Subject: [PATCH 1/1] viced-server-shutdown-diagnostics-20011005 print some debugging if we shutdown due to failure --- src/viced/host.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index f2048d2..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++) -- 1.9.4