Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AAFFC17219 for ; Thu, 2 Jul 2015 20:41:04 +0000 (UTC) Received: (qmail 2471 invoked by uid 500); 2 Jul 2015 20:41:04 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 2408 invoked by uid 500); 2 Jul 2015 20:41:04 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 2397 invoked by uid 99); 2 Jul 2015 20:41:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2015 20:41:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 20E25E367A; Thu, 2 Jul 2015 20:41:04 +0000 (UTC) From: SolidWallOfCode To: dev@trafficserver.apache.org Reply-To: dev@trafficserver.apache.org References: In-Reply-To: Subject: [GitHub] trafficserver pull request: Maintain and use a mapping of hostname... Content-Type: text/plain Message-Id: <20150702204104.20E25E367A@git1-us-west.apache.org> Date: Thu, 2 Jul 2015 20:41:04 +0000 (UTC) Github user SolidWallOfCode commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/240#discussion_r33820528 --- Diff: iocore/hostdb/P_HostDBProcessor.h --- @@ -190,6 +190,14 @@ extern RecRawStatBlock *hostdb_rsb; #define HOSTDB_DECREMENT_THREAD_DYN_STAT(_s, _t) RecIncrRawStatSum(hostdb_rsb, _t, (int)_s, -1); +struct CmpConstBuffferCaseInsensitive { + bool operator()(ts::ConstBuffer a, ts::ConstBuffer b) { return ptr_len_casecmp(a._ptr, a._size, b._ptr, b._size) < 0;} +}; +// A to hold a ref-counted map +struct RefCountedHostsFileMap : public RefCountObj { + std::map hosts_file_map; --- End diff -- You'll probably want `typedef std::map MapType;' here. It's a handy typedef. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---