Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 49179 invoked by uid 500); 17 Sep 2001 18:49:35 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 49168 invoked from network); 17 Sep 2001 18:49:34 -0000 From: "Mladen Turk" To: "Ian Holsman" Cc: "APR Dev List" Subject: RE: [PATCH] apr_dbm -- db fix Date: Mon, 17 Sep 2001 20:55:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1000752206.1295.12.camel@griffon.cnet.com> X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns.promo-grupa.com X-AntiAbuse: Original Domain - apr.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - mappingsoft.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Ian Holsman [mailto:ianh@cnet.com] > Sent: Monday, September 17, 2001 8:43 PM > To: Mladen Turk > Cc: APR Dev List > how does this patch affect db3? Currently you are returning data insted of key in apr_dbm_nextkey. RETURN_DATUM should copy key to key not data. So this patch fixes db1, db2 and db3 > > Index: apr_dbm.c > > =================================================================== > > RCS file: /home/cvspublic/apr-util/dbm/apr_dbm.c,v > > retrieving revision 1.27 > > diff -u -r1.27 apr_dbm.c > > --- apr_dbm.c 2001/08/29 18:34:05 1.27 > > +++ apr_dbm.c 2001/09/17 18:25:58 > > @@ -257,6 +257,10 @@ > > > > #if DB_VER == 1 > > dberr = (*f->bdb->seq)(f->bdb, pkey, &data, R_NEXT); > > + if (dberr == RET_SPECIAL) { > > + pkey->data = NULL; > > + pkey->size = 0; > > + } > > #else > > if (f->curs == NULL) > > return APR_EINVAL; > > @@ -553,7 +557,7 @@ > > > > CONVERT_DATUM(ckey, pkey); > > rv = APR_DBM_NEXTKEY(dbm->file, ckey, rd); > > - RETURN_DATUM(pkey, rd); > > + RETURN_DATUM(pkey, ckey); > > > > REGISTER_CLEANUP(dbm, pkey); > > > > > > MT. > -- > Ian Holsman IanH@cnet.com > Performance Measurement & Analysis > CNET Networks - (415) 364-8608 > > >