From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29677 invoked by alias); 17 Dec 2003 19:58:19 -0000 Mailing-List: contact sid-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sid-owner@sources.redhat.com Received: (qmail 29669 invoked from network); 17 Dec 2003 19:58:18 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 17 Dec 2003 19:58:18 -0000 Received: from redhat.com (topaz.toronto.redhat.com [172.16.14.227]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 7F5B48001CA for ; Wed, 17 Dec 2003 14:58:18 -0500 (EST) Message-ID: <3FE0B55A.2040403@redhat.com> Date: Wed, 17 Dec 2003 19:58:00 -0000 From: Dave Brolley Organization: Red Hat Canada, Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 MIME-Version: 1.0 To: sid@sources.redhat.com Subject: [patch] logger::delete_saved_messages Content-Type: multipart/mixed; boundary="------------030003010608070902000203" X-SW-Source: 2003-q4/txt/msg00045.txt.bz2 This is a multi-part message in MIME format. --------------030003010608070902000203 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 168 This corrects the clearing of saved_messages and saved_levels. The previous code was just plain incorrect and caused memory access problems on some platforms. Dave --------------030003010608070902000203 Content-Type: text/plain; name="logger.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="logger.ChangeLog" Content-length: 111 2003-12-17 Dave Brolley * sidmiscutil.h (delete_saved_messages): Use 'clear' method. --------------030003010608070902000203 Content-Type: text/plain; name="logger.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="logger.patch.txt" Content-length: 1177 Index: sid/include/sidmiscutil.h =================================================================== RCS file: /cvs/src/src/sid/include/sidmiscutil.h,v retrieving revision 1.7 retrieving revision 1.8 diff -c -p -r1.7 -r1.8 *** sid/include/sidmiscutil.h 21 Oct 2003 21:38:24 -0000 1.7 --- sid/include/sidmiscutil.h 17 Dec 2003 19:51:02 -0000 1.8 *************** *** 1,6 **** // sidmiscutil.h - Useful utility classes. -*- C++ -*- ! // Copyright (C) 1999-2002 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. --- 1,6 ---- // sidmiscutil.h - Useful utility classes. -*- C++ -*- ! // Copyright (C) 1999-2003 Red Hat. // This file is part of SID and is licensed under the GPL. // See the file COPYING.SID for conditions for redistribution. *************** namespace sidutil *** 526,532 **** public: void delete_saved_messages () { ! saved_messages.erase (saved_messages.end ()); } }; --- 526,533 ---- public: void delete_saved_messages () { ! saved_messages.clear (); ! saved_levels.clear (); } }; --------------030003010608070902000203--