]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/recycle.c
- Rename mac.c migrate.c
[bacula/bacula] / bacula / src / dird / recycle.c
index 20d5b5db3dab261207e2a38fcbba74ac9a20d56a..f034fae717526289488cb2149ae3a1d2b990f910 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 /*
-   Copyright (C) 2002-2005 Kern Sibbald
+   Copyright (C) 2002-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -77,8 +77,8 @@ int recycle_oldest_purged_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr)
    oldest.MediaId = 0;
    if (InChanger) {
       char changer[100];
-      bsnprintf(changer, sizeof(changer), "AND InChanger=1 AND StorageId=%s",
-         mr->StorageId);
+      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, "");