optimization - if the compression table for a message is empty, don't

hash and look up each label.
This commit is contained in:
Brian Wellington 2001-02-10 01:18:19 +00:00
parent a771e5c797
commit 64e7f8541d

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: compress.c,v 1.45 2001/02/09 02:13:06 bwelling Exp $ */
/* $Id: compress.c,v 1.46 2001/02/10 01:18:19 bwelling Exp $ */
#define DNS_NAME_USEINLINE 1
@ -125,6 +125,9 @@ dns_compress_findglobal(dns_compress_t *cctx, dns_name_t *name,
REQUIRE(dns_name_isabsolute(name) == ISC_TRUE);
REQUIRE(offset != NULL);
if (cctx->count == 0)
return (ISC_FALSE);
labels = dns_name_countlabels(name);
INSIST(labels > 0);