afs_int32 haddr;
afs_int32 hport;
int i, j, count;
+ char hoststr[16], hoststr2[16];
haddr = rxr_HostOf(tcon);
hport = rxr_PortOf(tcon);
/* Another thread is doing initialization */
h_Unlock_r(host);
if ( !held) h_Release_r(host);
- ViceLog(125, ("Host %x starting h_Lookup again\n", host));
+ ViceLog(125, ("Host %s:%d starting h_Lookup again\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
host->hostFlags &= ~ALTADDR;
* that we maintain some extra callback state information */
if (host->interface) {
ViceLog(0,
- ("Host %x used to support WhoAreYou, deleting.\n",
- host));
+ ("Host %s:%d used to support WhoAreYou, deleting.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
if ( !host->interface
|| !afs_uuid_equal(&interf.uuid, &host->interface->uuid) ) {
ViceLog(25,
- ("Host %x has changed its identity, deleting.\n",
- host));
+ ("Host %s:%d has changed its identity, deleting.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
goto retry;
}
} else {
- char hoststr[16];
afs_inet_ntoa_r(host->host, hoststr);
ViceLog(0,("CB: WhoAreYou failed for %s:%d, error %d\n",
hoststr, ntohs(host->port), code));
if ( ! (host->hostFlags & ALTADDR) )
{
/* another thread is doing the initialisation */
- ViceLog(125, ("Host %x waiting for host-init to complete\n",
- host));
+ ViceLog(125, ("Host %s:%d waiting for host-init to complete\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
h_Lock_r(host);
h_Unlock_r(host);
if ( !held) h_Release_r(host);
- ViceLog(125, ("Host %x starting h_Lookup again\n", host));
+ ViceLog(125, ("Host %s:%d starting h_Lookup again\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
/* We need to check whether the identity in the host structure
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
if (!held) h_Release_r(host);
- ViceLog(0,("CB: new identity for host %x, deleting\n",
- host->host));
+ ViceLog(0, ("CB: new identity for host %s:%d, deleting\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
goto retry;
}
} else {
identP->valid = 0;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
ViceLog(25,
- ("Host %x does not support WhoAreYou.\n",
- host->host));
+ ("Host %s:%d does not support WhoAreYou.\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
code = 0;
} else if (code == 0) {
interfValid = 1;
identP->valid = 1;
identP->uuid = interf.uuid;
rx_SetSpecific(tcon, rxcon_ident_key, identP);
- ViceLog(25,("WhoAreYou success on %x\n", host->host));
+ ViceLog(25, ("WhoAreYou success on %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
}
}
if (code == 0 && !identP->valid) {
if (!(held = h_Held_r(oldHost)))
h_Hold_r(oldHost);
h_Lock_r(oldHost);
- ViceLog(25,("CB: new addr %x for old host %x\n",
- host->host, oldHost->host));
+ ViceLog(25, ("CB: new addr %s:%d for old host %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port,
+ afs_inet_ntoa_r(oldHost->host, hoststr2), oldHost->port));
host->hostFlags |= HOSTDELETED;
h_Unlock_r(host);
h_Release_r(host);
&FS_HostUUID);
H_LOCK
if (code == 0) {
- ViceLog(25,("InitCallBackState3 success on %x\n",
- host->host));
+ ViceLog(25, ("InitCallBackState3 success on %s:%d\n",
+ afs_inet_ntoa_r(host->host, hoststr), host->port));
assert(interfValid == 1);
initInterfaceAddr_r(host, &interf);
}
}
}
if (code) {
- char hoststr[16];
afs_inet_ntoa_r(host->host, hoststr);
ViceLog(0,("CB: RCallBackConnectBack failed for %s:%d\n",
hoststr, ntohs(host->port)));
code = pr_GetCPS(viceid, &client->CPS);
H_LOCK
if (code) {
- ViceLog(0, ("pr_GetCPS failed(%d) for user %d, host %x.%d\n",
- code, viceid, client->host->host, ntohs(client->host->port)));
+ char hoststr[16];
+ ViceLog(0, ("pr_GetCPS failed(%d) for user %d, host %s:%d\n",
+ code, viceid,
+ afs_inet_ntoa_r(client->host->host, hoststr),
+ client->host->port));
/* Although ubik_Call (called by pr_GetCPS) traverses thru
* all protection servers and reevaluates things if no
assert(client && client->tcon && rxr_CidOf(client->tcon) == client->sid);
if (client &&
client->LastCall > client->expTime && client->expTime) {
- ViceLog(1, ("Token for %s at %x.%d expired %d\n",
- h_UserName(client), client->host->host, client->host->port, client->expTime));
+ char hoststr[16];
+ ViceLog(1, ("Token for %s at %s:%d expired %d\n",
+ h_UserName(client),
+ afs_inet_ntoa_r(client->host->host, hoststr),
+ client->host->port, client->expTime));
H_UNLOCK
return VICETOKENDEAD;
}
int i;
char tmpStr[256];
char tbuffer[32];
+ char hoststr[16];
H_LOCK
if (host->hostFlags & HOSTDELETED) {
H_UNLOCK
return held;
}
- sprintf(tmpStr,"Host %x.%d down = %d, LastCall %s", host->host,
- host->port, (host->hostFlags & VENUSDOWN),
+ sprintf(tmpStr,"Host %s:%d down = %d, LastCall %s",
+ afs_inet_ntoa_r(host->host, hoststr), host->port,
+ (host->hostFlags & VENUSDOWN),
afs_ctime((time_t *)&host->LastCall, tbuffer, sizeof(tbuffer)));
STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
for (client = host->FirstClient; client; client=client->next) {