retry:
tclient = h_FindClient_r(*tconn);
if (!tclient) {
- ViceLog(0, ("CallPreamble: Couldn't get CPS. Too many lockers\n"));
+ ViceLog(0, ("CallPreamble: Couldn't get client.\n"));
H_UNLOCK;
return VBUSY;
}
if (HTBlocks == h_MAXHOSTTABLES) {
ViceLog(0, ("h_MAXHOSTTABLES reached\n"));
- ShutDownAndCore(PANIC);
+ return;
}
block = (struct HTBlock *)malloc(sizeof(struct HTBlock));
if (HTFree == NULL)
GetHTBlock();
- osi_Assert(HTFree != NULL);
+ if (HTFree == NULL)
+ return NULL;
entry = HTFree;
HTFree = entry->next;
HTs++;
*/
#define DEF_ROPCONS 2115
-struct host *
+static struct host *
h_Alloc_r(struct rx_connection *r_con)
{
struct servent *serverentry;
#endif /* FS_STATS_DETAILED */
host = GetHT();
+ if (!host)
+ return NULL;
host->host = rxr_HostOf(r_con);
host->port = rxr_PortOf(r_con);
}
} else {
host = h_Alloc_r(tcon); /* returned held and locked */
+ if (!host)
+ goto gethost_out;
h_gethostcps_r(host, FT_ApproxTime());
if (!(host->Console & 1)) {
int pident = 0;
osi_Assert(hcps != NULL);
}
+ /* for restoring state, we better be able to get a host! */
host = GetHT();
osi_Assert(host != NULL);
extern void *ShutDown(void *);
extern void ShutDownAndCore(int dopanic);
-extern struct host *h_Alloc(struct rx_connection *r_con);
-extern struct host *h_Alloc_r(struct rx_connection *r_con);
extern int h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
struct host **hostp);
extern struct host *h_LookupUuid_r(afsUUID * uuidp);