dont send exception msg to all serach requests when the server

runs out of memory (send exception resp only in reply to search
requests that find a match)
This commit is contained in:
Jeff Hill
1995-04-26 03:12:53 +00:00
parent 64b7a679a0
commit 302f4ef6c8

View File

@@ -1582,19 +1582,6 @@ struct client *client
unsigned long count;
int type;
/*
* set true if max memory block drops below MAX_BLOCK_THRESHOLD
*/
if(casDontAllowSearchReplies){
SEND_LOCK(client);
send_err(mp,
ECA_ALLOCMEM,
client,
"Server memory exhausted");
SEND_UNLOCK(client);
return;
}
/* Exit quickly if channel not on this node */
status = db_name_to_addr(
mp + 1,
@@ -1613,6 +1600,19 @@ struct client *client
return;
}
/*
* set true if max memory block drops below MAX_BLOCK_THRESHOLD
*/
if(casDontAllowSearchReplies){
SEND_LOCK(client);
send_err(mp,
ECA_ALLOCMEM,
client,
"Server memory exhausted");
SEND_UNLOCK(client);
return;
}
/*
* starting with V4.4 the count field is used (abused)
* to store the minor version number of the client.