From 4fc007864d315524fd19ae10b32df6132d080d6d Mon Sep 17 00:00:00 2001 From: wr61 Date: Tue, 6 Sep 2005 22:36:57 +0000 Subject: g++ 2.95 needs a copy constructor for mgSQLString - bad boy. And fix another memleak git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@821 e10066b5-e1e2-0310-b819-94efdf66514b --- mg_db.c | 6 ++++++ mg_db.h | 1 + 2 files changed, 7 insertions(+) diff --git a/mg_db.c b/mg_db.c index 9f65e72..bb07afd 100644 --- a/mg_db.c +++ b/mg_db.c @@ -88,6 +88,11 @@ mgSQLString::mgSQLString(const char*s) Init(s); } +mgSQLString::mgSQLString(const mgSQLString& s) +{ + Init(s.original()); +} + mgSQLString::mgSQLString(string s) { Init(s.c_str()); @@ -959,6 +964,7 @@ mgDb::getAlbum(const char *filename,const mgSQLString& c_album, free(b); asprintf(&b,"UPDATE album SET artist='Various Artists' WHERE cddbid=%s",result.quoted()); Execute(b); + free(b); // here we could change all tracks.sourceid to result and delete // the other album entries for this album, but that should only // be needed if a pre 0.1.4 import has been done incorrectly, so we diff --git a/mg_db.h b/mg_db.h index 934d372..a0dca80 100644 --- a/mg_db.h +++ b/mg_db.h @@ -53,6 +53,7 @@ class mgSQLString { mgSQLString(const char*s); mgSQLString(string s); mgSQLString(TagLib::String s); + mgSQLString(const mgSQLString& s); ~mgSQLString(); char *quoted() const; char *unquoted() const; -- cgit v1.2.3