From: <gi...@ba...> - 2012-02-21 15:50:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula Community source". The branch, Branch-5.2 has been updated via 7b78e58039200f88863f1409bea0a0cc56216445 (commit) via cb8e299fbd52d535e7914ccb78d4e37497ea0042 (commit) via bca44b71176b0908bdcbc37ce5d93183e21824f2 (commit) from 253805808d1e3bad057190001e41beea034c8af3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7b78e58039200f88863f1409bea0a0cc56216445 Author: Eric Bollengier <er...@ba...> Date: Fri Feb 17 15:21:15 2012 +0100 Fix old exchange-fd plugin Accurate checkFile code. It now marks files as seen only when the plugin is used. Not perfect, but probably sufficient. commit cb8e299fbd52d535e7914ccb78d4e37497ea0042 Author: Marco van Wieringen <mv...@pl...> Date: Thu Feb 16 23:52:39 2012 +0100 Tweak some comments and formatting. commit bca44b71176b0908bdcbc37ce5d93183e21824f2 Author: Marco van Wieringen <mv...@pl...> Date: Thu Feb 16 22:08:06 2012 +0100 Insert the slot field as a numeric field. The sorting in mediaview doesn't work well as the slot field is added as a text field not a numeric field. ----------------------------------------------------------------------- Summary of changes: diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index 05cbda8..670241f 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -207,8 +207,7 @@ void MediaList::populateTree() int inchanger = fld.next().toInt(); if (inchanger) { mediaitem.setNumericFld(index++, fld.next()); - } - else { + } else { /* volume not in changer, show blank slot */ mediaitem.setNumericFld(index++, ""); fld.next(); diff --git a/bacula/src/qt-console/medialist/mediaview.cpp b/bacula/src/qt-console/medialist/mediaview.cpp index 6f8f282..7a44e15 100644 --- a/bacula/src/qt-console/medialist/mediaview.cpp +++ b/bacula/src/qt-console/medialist/mediaview.cpp @@ -336,7 +336,7 @@ void MediaView::populateTable() foreach (resultline, results) { // should have only one result int index = 0; - QString Slot, VolBytes, MediaType, LastWritten, VolStatus; + QString VolBytes, MediaType, LastWritten, VolStatus; fieldlist = resultline.split("\t"); if (fieldlist.size() != 10) { continue; @@ -350,8 +350,8 @@ void MediaView::populateTable() /* Online */ mediaitem.setInChanger(index++, fld.next()); - Slot = fld.next(); // Slot - mediaitem.setTextFld(index++, Slot); + /* Slot */ + mediaitem.setNumericFld(index++, fld.next()); MediaType = fld.next(); VolStatus = fld.next(); diff --git a/bacula/src/qt-console/restore/brestore.cpp b/bacula/src/qt-console/restore/brestore.cpp index f1b6b29..f397b4e 100644 --- a/bacula/src/qt-console/restore/brestore.cpp +++ b/bacula/src/qt-console/restore/brestore.cpp @@ -286,7 +286,7 @@ void bRestore::displayFileVersion(QString pathid, QString fnid, //PathId, FilenameId, fileid, jobid, lstat, Md5, VolName, Inchanger fieldlist = resultline.split("\t"); TableItemFormatter item(*FileRevisions, row++); - item.setInChanger(col++, fieldlist.at(7)); // inchanger + item.setInChanger(col++, fieldlist.at(7)); // inchanger item.setTextFld(col++, fieldlist.at(6)); // Volume item.setNumericFld(col++, fieldlist.at(3)); // JobId decode_stat(fieldlist.at(4).toLocal8Bit().data(), diff --git a/bacula/src/qt-console/storage/storage.cpp b/bacula/src/qt-console/storage/storage.cpp index 996d0eb..7a3021c 100644 --- a/bacula/src/qt-console/storage/storage.cpp +++ b/bacula/src/qt-console/storage/storage.cpp @@ -146,7 +146,7 @@ void Storage::populateTree() QStringListIterator fld(fieldlist); /* storage id */ - storageItem.setNumericFld(index++, fld.next() ); + storageItem.setNumericFld(index++, fld.next()); /* changer */ QString changer = fld.next(); diff --git a/bacula/src/qt-console/util/fmtwidgetitem.cpp b/bacula/src/qt-console/util/fmtwidgetitem.cpp index b98bdcb..d284ac2 100644 --- a/bacula/src/qt-console/util/fmtwidgetitem.cpp +++ b/bacula/src/qt-console/util/fmtwidgetitem.cpp @@ -283,13 +283,13 @@ void ItemFormatterBase::setBoolFld(int index, int fld, bool center) void ItemFormatterBase::setNumericFld(int index, const QString &fld) { setRightFld(index, fld.trimmed()); - setSortValue(index, fld.toDouble() ); + setSortValue(index, fld.toDouble()); } void ItemFormatterBase::setNumericFld(int index, const QString &fld, const QVariant &sortval) { setRightFld(index, fld.trimmed()); - setSortValue(index, sortval ); + setSortValue(index, sortval); } void ItemFormatterBase::setBytesFld(int index, const QString &fld) diff --git a/bacula/src/win32/filed/plugins/exchange-fd.c b/bacula/src/win32/filed/plugins/exchange-fd.c index a8a0dba..f5f80b4 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.c +++ b/bacula/src/win32/filed/plugins/exchange-fd.c @@ -518,7 +518,9 @@ static bRC setFileAttributes(bpContext *ctx, struct restore_pkt *rp) static bRC checkFile(bpContext *ctx, char *fname) { exchange_fd_context_t *context = (exchange_fd_context_t *)ctx->pContext; - _DebugMessage(100, "checkFile\n"); - /* previous files are always Seen */ - return bRC_Seen; + if (context->plugin_active) { + _DebugMessage(100, "marked as seen %s\n", fname); + return bRC_Seen; + } + return bRC_OK; } hooks/post-receive -- Bacula Community source |