From: Kern Sibbald Date: Tue, 20 May 2008 15:40:58 +0000 (+0000) Subject: kes Remove double quotes from ChangeLog and ReleaseNotes X-Git-Tag: Release-7.0.0~4561 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=39fdcd892de5c79e565522273f180a68fc45baaa;p=bacula%2Fbacula kes Remove double quotes from ChangeLog and ReleaseNotes kes Remove StorageId test when pruning and recycling (Eric's changes). kes Remove old form of locking when getting volumes -- causes deadlock. kes Change bat dirstat layoutWidget to dirstatlayoutWidget to make the name unique and to eliminate compile time error. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6997 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/autoprune.c b/bacula/src/dird/autoprune.c index df4cb5542d..2b8e8cb91f 100644 --- a/bacula/src/dird/autoprune.c +++ b/bacula/src/dird/autoprune.c @@ -138,18 +138,10 @@ bool prune_volumes(JCR *jcr, bool InChanger, MEDIA_DBR *mr) * RecyclePoolId is the current pool or the scratch pool */ const char *select = "SELECT DISTINCT MediaId,LastWritten FROM Media WHERE " - "(PoolId=%s OR RecyclePoolId IN (%s)) AND MediaType='%s' %s" + "(PoolId=%s OR RecyclePoolId IN (%s)) AND MediaType='%s' " "ORDER BY LastWritten ASC,MediaId"; - if (InChanger) { - char changer[100]; - /* Ensure it is in this autochanger */ - bsnprintf(changer, sizeof(changer), "AND InChanger=1 AND StorageId=%s ", - edit_int64(mr->StorageId, ed3)); - Mmsg(query, select, ed1, ed2, mr->MediaType, changer); - } else { - Mmsg(query, select, ed1, ed2, mr->MediaType, ""); - } + Mmsg(query, select, ed1, ed2, mr->MediaType); Dmsg1(050, "query=%s\n", query.c_str()); if (!db_get_query_dbids(ua->jcr, ua->db, query, ids)) { diff --git a/bacula/src/dird/recycle.c b/bacula/src/dird/recycle.c index d960643db6..fdabb4d600 100644 --- a/bacula/src/dird/recycle.c +++ b/bacula/src/dird/recycle.c @@ -83,19 +83,12 @@ bool recycle_oldest_purged_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr) const char *select = "SELECT MediaId,LastWritten FROM Media " "WHERE PoolId=%s AND Recycle=1 AND VolStatus='Purged' " - "AND Enabled=1 AND MediaType='%s' %s" + "AND Enabled=1 AND MediaType='%s' " "ORDER BY LastWritten ASC,MediaId LIMIT 1"; Dmsg0(100, "Enter recycle_oldest_purged_volume\n"); oldest.MediaId = 0; - if (InChanger) { - char changer[100]; - bsnprintf(changer, sizeof(changer), "AND InChanger=1 AND StorageId=%s ", - edit_int64(mr->StorageId, ed1)); - Mmsg(query, select, edit_int64(mr->PoolId, ed1), mr->MediaType, changer); - } else { - Mmsg(query, select, edit_int64(mr->PoolId, ed1), mr->MediaType, ""); - } + Mmsg(query, select, edit_int64(mr->PoolId, ed1), mr->MediaType); if (!db_sql_query(jcr->db, query, oldest_handler, (void *)&oldest)) { Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db)); diff --git a/bacula/src/qt-console/status/dirstat.ui b/bacula/src/qt-console/status/dirstat.ui index 4d2b615f50..22ad3ed333 100644 --- a/bacula/src/qt-console/status/dirstat.ui +++ b/bacula/src/qt-console/status/dirstat.ui @@ -95,7 +95,7 @@ true - + 6 diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 3b83ca961f..39c5f46088 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -491,9 +491,7 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr) Jmsg(jcr, M_INFO, 0, "%s", dev->errmsg); return false; } - dev->dlock(); got_vol = dir_find_next_appendable_volume(dcr); /* get suggested volume */ - dev->dunlock(); if (got_vol) { return true; } else { diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index 3b99ba77c0..ce1cb87467 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -25,6 +25,11 @@ Add long term statistics job table General: 20May08 +kes Remove double quotes from ChangeLog and ReleaseNotes +kes Remove StorageId test when pruning and recycling (Eric's changes). +kes Remove old form of locking when getting volumes -- causes deadlock. +kes Change bat dirstat layoutWidget to dirstatlayoutWidget to make + the name unique and to eliminate compile time error. kes Add accurate.o to Win32 FD Makefile 19May08 kes Fix cats dll build on Win32 after db_update_job_end_record