Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3718F200D01 for ; Fri, 8 Sep 2017 01:54:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 361D91609DC; Thu, 7 Sep 2017 23:54:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7C4101609BE for ; Fri, 8 Sep 2017 01:54:11 +0200 (CEST) Received: (qmail 81276 invoked by uid 500); 7 Sep 2017 23:54:10 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 81266 invoked by uid 99); 7 Sep 2017 23:54:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 23:54:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 646A41A73CF for ; Thu, 7 Sep 2017 23:54:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.879 X-Spam-Level: X-Spam-Status: No, score=0.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id yJTwIKnaJb0m for ; Thu, 7 Sep 2017 23:54:05 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 97DFE60FA3 for ; Thu, 7 Sep 2017 23:54:04 +0000 (UTC) Received: by mail-oi0-f45.google.com with SMTP id x190so6669195oix.3 for ; Thu, 07 Sep 2017 16:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=0jkvomhnHvkpXxuUUVYqj4uR8/GzuhnIEDrAfK52Cd4=; b=LlWDga4SeieyooGJQnZJiL4fv6KyNFjBeh2JydpGFsztoMNVzS3wXqOjzkUHB66s1Y dK5bfJizRwO7TrmFcpsWzS52E+4OnacnLOdnOMKtolXi/sEte6t0mjpHg5ez83TnQ68r rdwypCU3c4oa5jZqgFIG3uObM6cZThO+TuqN/Apxj9X2h1fsX3FyaGbWJCxXR41rmcSj 1YctHQnTgljW+hIh3vC0aVtZJ5E2gezNSzDh36yr4lAPxPkdbtzUW6OdIGDHde1v1ucN 1bjJFgwh8j6zhOidDnkVCW007ly53Z3U10Ka6mD+6pZ0S3bZXQg0iuXNT6J1RIFugAgI l/vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=0jkvomhnHvkpXxuUUVYqj4uR8/GzuhnIEDrAfK52Cd4=; b=hP1YEmKxGFmZfN97vWUCgmkEjkHQnOq8KfmrBrnz0IuPU/Uzbnw0/RI9QO1eYy2sWc WkH4R9522UbkLqS7MDy0kAtzdCQJ4w5RLSZbpw+p7iJyZjgFBvApKntYkp4xgVJp7ux9 X6F2Q+NLDTR0IEF3ipsgceNdyCBg5xjs3j6vQoVcaTRvroEy7uWU72d77K7n6AL9+PrJ 9GtZP8k97fx0RHhuzMJy/gbUYzHkPJb2yUztuTax4i2IgkUBO+dQfkC32Ai9RZ76SIdw dzGTF0C4WC6iLKhKDmuywM599Y2bKejUZJk6b41IjbY3hVBMpPeQ9h6miSOAgIkY34cb Rxuw== X-Gm-Message-State: AHPjjUgEmyXzW9mKsLp6Gr8KRMzddwjkOAd/rspijMD/s1xug1sSN3bY N2upFYr7gK0cc6s625sHn7hMeD1ORXmi X-Google-Smtp-Source: AOwi7QClPTY0JqPtEoMzg37N5vm2cnpKir50Qxeni7AIzT3fEeMU2aNpwUhPuBZJwJUshMXOgZa1LksniwwkMDh1hZU= X-Received: by 10.202.75.211 with SMTP id y202mr1130595oia.66.1504828443604; Thu, 07 Sep 2017 16:54:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.168.183.14 with HTTP; Thu, 7 Sep 2017 16:54:03 -0700 (PDT) In-Reply-To: References: From: Eric Covener Date: Thu, 7 Sep 2017 19:54:03 -0400 Message-ID: To: users@httpd.apache.org Content-Type: text/plain; charset="UTF-8" Subject: Re: [users@httpd] how to get apr_pool_t when need to call ap_md5 archived-at: Thu, 07 Sep 2017 23:54:12 -0000 On Thu, Sep 7, 2017 at 12:07 PM, eeadev dev wrote: > In my function I need to get the checksum using md5. > > I saw that there is this function ap_md5(apr_pool_t *a, const unsigned char > *string); > > but it needs apr_pool_t > > how can I get it? > > char key[] = "abc"; > > key_md5 = ap_md5(mem_pool, key); Most request processing hooks are passed the request_rec which has a pool with request lifetime. Similar for connection-level hooks and conn_rec. While parsing directives, you have pools passed on the cmd_* structure which are either temporary or very long-lived. Finally, you can create & destroy a new pool if you are in some very weird code. Could you elaborate on the context? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org