Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 1252 invoked from network); 3 Jun 2008 00:23:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 00:23:09 -0000 Received: (qmail 76969 invoked by uid 500); 3 Jun 2008 00:23:12 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 76926 invoked by uid 500); 3 Jun 2008 00:23:11 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 76917 invoked by uid 99); 3 Jun 2008 00:23:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 17:23:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 00:22:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2BA4E2388A16; Mon, 2 Jun 2008 17:22:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r662609 - /apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Date: Tue, 03 Jun 2008 00:22:48 -0000 To: commits@apr.apache.org From: bojan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080603002248.2BA4E2388A16@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bojan Date: Mon Jun 2 17:22:47 2008 New Revision: 662609 URL: http://svn.apache.org/viewvc?rev=662609&view=rev Log: Silence warnings and notices in PostgreSQL DBD driver. Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_pgsql.c?rev=662609&r1=662608&r2=662609&view=diff ============================================================================== --- apr/apr-util/trunk/dbd/apr_dbd_pgsql.c (original) +++ apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Mon Jun 2 17:22:47 2008 @@ -1191,6 +1191,16 @@ return trans->mode = (mode & TXN_MODE_BITS); } +static void null_notice_receiver(void *arg, const PGresult *res) +{ + /* nothing */ +} + +static void null_notice_processor(void *arg, const char *message) +{ + /* nothing */ +} + static apr_dbd_t *dbd_pgsql_open(apr_pool_t *pool, const char *params, const char **error) { @@ -1210,6 +1220,9 @@ return NULL; } + PQsetNoticeReceiver(conn, null_notice_receiver, NULL); + PQsetNoticeProcessor(conn, null_notice_processor, NULL); + sql = apr_pcalloc (pool, sizeof (*sql)); sql->conn = conn;