]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/next_vol.c
kes Update copyright date in program files, and for the most part
[bacula/bacula] / bacula / src / dird / next_vol.c
index 4b09c70ff4a9633887c6a40f02003cf160178996..82675a2246c12094d098fd53d0f35fb582075261 100644 (file)
@@ -43,7 +43,7 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index, bool create)
    int retry = 0;
    bool ok;
    bool InChanger;
-   STORE *store = jcr->store;
+   STORE *store = jcr->wstore;
 
    bstrncpy(mr->MediaType, store->media_type, sizeof(mr->MediaType));
    Dmsg2(100, "CatReq FindMedia: PoolId=%d, MediaType=%s\n", (int)mr->PoolId, mr->MediaType);
@@ -62,14 +62,15 @@ int find_next_volume_for_append(JCR *jcr, MEDIA_DBR *mr, int index, bool create)
        *  1. Look for volume with "Append" status.
        */
       ok = db_find_next_volume(jcr, jcr->db, index, InChanger, mr);
-      Dmsg2(100, "catreq after find_next_vol ok=%d FW=%d\n", ok, mr->FirstWritten);
+      Dmsg4(100, "after find_next_vol index=%d ok=%d InChanger=%d Vstat=%s\n",
+            index, ok, InChanger, mr->VolStatus);
 
       if (!ok) {
          /*
           * 2. Try finding a recycled volume
           */
          ok = find_recycled_volume(jcr, InChanger, mr);
-         Dmsg2(100, "find_recycled_volume %d FW=%d\n", ok, mr->FirstWritten);
+         Dmsg2(100, "find_recycled_volume ok=%d FW=%d\n", ok, mr->FirstWritten);
          if (!ok) {
             /*
              * 3. Try recycling any purged volume