From e01fad61e6b5018c4f78807e889a50ac5bc4ca61 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 17 Jan 2003 06:24:45 +0000 Subject: [PATCH] STABLE12-viced-improved-host-logging-20030117 to deal with condition reported by lha@stacken.kth.se (cherry picked from commit 12eb511d4516dc5c82dc565bf1ae634e479b09ed) --- src/viced/host.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index 61bf469b1b..97ccf870f5 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -1055,14 +1055,24 @@ retry: && ( ( !identP->valid && host->interface ) || ( identP->valid && !host->interface ) || ( identP->valid - && !afs_uuid_equal(&identP->uuid, &host->interface->uuid) ) ) ) { - /* The host in the cache is not the host for this connection */ - host->hostFlags |= HOSTDELETED; - h_Unlock_r(host); - if (!held) h_Release_r(host); - ViceLog(0, ("CB: new identity for host %s:%d, deleting\n", - afs_inet_ntoa_r(host->host, hoststr), host->port)); - goto retry; + && !afs_uuid_equal(&identP->uuid, &host->interface->uuid) ) ) ) + { + char uuid1[128], uuid2[128]; + /* The host in the cache is not the host for this connection */ + host->hostFlags |= HOSTDELETED; + h_Unlock_r(host); + if (!held) h_Release_r(host); + + if (identP->valid) + afsUUID_to_string(identP->uuid, uuid1, 127); + if (host->interface) + afsUUID_to_string(host->interface->uuid, uuid2, 127); + ViceLog(0, + ("CB: new identity for host %s:%d, deleting(%x %x %s %s)\n", + afs_inet_ntoa_r(host->host, hoststr), host->port, + identP->valid, host->interface, identP->valid ? uuid1 : + "", host->interface ? uuid2 : "")); + goto retry; } } else { host = h_Alloc_r(tcon);