From 302f4ef6c8a2d1670f9c66d6dc0fbf67e107d073 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 26 Apr 1995 03:12:53 +0000 Subject: [PATCH] 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) --- src/rsrv/camessage.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 6da2fdb69..8fea67d75 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -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.