goto retry;
}
} else {
- char *hoststr = afs_inet_ntoa_r(host->host);
- ViceLog(0,("CB: WhoAreYou failed for %s:%d, error %d\n",
- hoststr, ntohs(host->port), code));
- host->hostFlags |= VENUSDOWN;
- free(hoststr);
+ 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));
+ host->hostFlags |= VENUSDOWN;
}
host->hostFlags |= ALTADDR;
h_Unlock_r(host);
}
}
if (code) {
- char *hoststr = afs_inet_ntoa_r(host->host);
- ViceLog(0,("CB: RCallBackConnectBack failed for %s:%d\n",
- hoststr, ntohs(host->port)));
- host->hostFlags |= VENUSDOWN;
- free(hoststr);
+ char hoststr[16];
+ afs_inet_ntoa_r(host->host, hoststr);
+ ViceLog(0,("CB: RCallBackConnectBack failed for %s:%d\n",
+ hoststr, ntohs(host->port)));
+ host->hostFlags |= VENUSDOWN;
}
else
host->hostFlags |= RESETDONE;
host->hostFlags |= ALTADDR; /* alternate addresses valid */
if ( code )
{
- char *hoststr = afs_inet_ntoa_r(host->host);
- ViceLog(0,
- ("CB: RCallBackConnectBack (host.c) failed for host %s:%d\n",
- hoststr, ntohs(host->port)));
- host->hostFlags |= VENUSDOWN;
- free(hoststr);
- }
+ char hoststr[16];
+ afs_inet_ntoa_r(host->host, hoststr);
+ ViceLog(0,
+ ("CB: RCallBackConnectBack (host.c) failed for host %s:%d\n",
+ hoststr, ntohs(host->port)));
+ host->hostFlags |= VENUSDOWN;
+ }
/* Note: it's safe to delete hosts even if they have call
* back state, because break delayed callbacks (called when a
* message is received from the workstation) will always send a
H_LOCK
if(code) {
if ( MultiProbeAlternateAddress_r(host) ) {
- char *hoststr = afs_inet_ntoa_r(host->host);
- ViceLog(0,
+ char hoststr[16];
+ afs_inet_ntoa_r(host->host, hoststr);
+ ViceLog(0,
("ProbeUuid failed for host %s:%d\n",
hoststr, ntohs(host->port)));
- host->hostFlags |= VENUSDOWN;
- free(hoststr);
+ host->hostFlags |= VENUSDOWN;
}
}
} else {
code = RXAFSCB_Probe(host->callback_rxcon);
H_LOCK
if (code) {
- char *hoststr = afs_inet_ntoa_r(host->host);
- ViceLog(0, ("ProbeUuid failed for host %s:%d\n",
- hoststr, ntohs(host->port)));
- host->hostFlags |= VENUSDOWN;
- free(hoststr);
+ char hoststr[16];
+ afs_inet_ntoa_r(host->host, hoststr);
+ ViceLog(0, ("ProbeUuid failed for host %s:%d\n",
+ hoststr, ntohs(host->port)));
+ host->hostFlags |= VENUSDOWN;
}
}
}
ViceLog(0, ("Can't find address for FileServer '%s'\n", FS_HostName));
}
else {
- char *hoststr;
- bcopy(he->h_addr, &FS_HostAddr_NBO, 4);
- hoststr = afs_inet_ntoa_r(FS_HostAddr_NBO);
- FS_HostAddr_HBO = ntohl(FS_HostAddr_NBO);
- ViceLog(0,("FileServer %s has address %s (0x%x or 0x%x in host byte order)\n",
- FS_HostName, hoststr, FS_HostAddr_NBO, FS_HostAddr_HBO));
- free(hoststr);
+ char hoststr[16];
+ bcopy(he->h_addr, &FS_HostAddr_NBO, 4);
+ afs_inet_ntoa_r(FS_HostAddr_NBO, hoststr);
+ FS_HostAddr_HBO = ntohl(FS_HostAddr_NBO);
+ ViceLog(0,("FileServer %s has address %s (0x%x or 0x%x in host byte order)\n",
+ FS_HostName, hoststr, FS_HostAddr_NBO, FS_HostAddr_HBO));
}
/* Install handler to catch the shutdown signal */