]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/wait.c
Start adding DeltaSeq
[bacula/bacula] / bacula / src / stored / wait.c
index 3cdf8e095a7f9dbb9f1d7add33e2324a1b6a8978..6b4e9eb891c478cea80937c6e0c2ed2bbf1a466d 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -69,7 +69,7 @@ int wait_for_sysop(DCR *dcr)
     */
    volume_unused(dcr);
 
     */
    volume_unused(dcr);
 
-   unmounted = is_device_unmounted(dev);
+   unmounted = dev->is_device_unmounted();
    dev->poll = false;
    /*
     * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
    dev->poll = false;
    /*
     * Wait requested time (dev->rem_wait_sec).  However, we also wake up every
@@ -104,11 +104,12 @@ int wait_for_sysop(DCR *dcr)
       Dmsg4(dbglvl, "I'm going to sleep on device %s. HB=%d rem_wait=%d add_wait=%d\n", 
          dev->print_name(), (int)me->heartbeat_interval, dev->rem_wait_sec, add_wait);
       start = time(NULL);
       Dmsg4(dbglvl, "I'm going to sleep on device %s. HB=%d rem_wait=%d add_wait=%d\n", 
          dev->print_name(), (int)me->heartbeat_interval, dev->rem_wait_sec, add_wait);
       start = time(NULL);
+
       /* Wait required time */
       stat = pthread_cond_timedwait(&dev->wait_next_vol, &dev->m_mutex, &timeout);
       /* Wait required time */
       stat = pthread_cond_timedwait(&dev->wait_next_vol, &dev->m_mutex, &timeout);
+
       Dmsg2(dbglvl, "Wokeup from sleep on device stat=%d blocked=%s\n", stat,
          dev->print_blocked());
       Dmsg2(dbglvl, "Wokeup from sleep on device stat=%d blocked=%s\n", stat,
          dev->print_blocked());
-
       now = time(NULL);
       total_waited = now - first_start;
       dev->rem_wait_sec -= (now - start);
       now = time(NULL);
       total_waited = now - first_start;
       dev->rem_wait_sec -= (now - start);
@@ -135,7 +136,6 @@ int wait_for_sysop(DCR *dcr)
          break;
       }
 
          break;
       }
 
-
       if (dev->rem_wait_sec <= 0) {  /* on exceeding wait time return */
          Dmsg0(dbglvl, "Exceed wait time.\n");
          stat = W_TIMEOUT;
       if (dev->rem_wait_sec <= 0) {  /* on exceeding wait time return */
          Dmsg0(dbglvl, "Exceed wait time.\n");
          stat = W_TIMEOUT;
@@ -145,7 +145,7 @@ int wait_for_sysop(DCR *dcr)
       /*
        * Check if user unmounted the device while we were waiting
        */
       /*
        * Check if user unmounted the device while we were waiting
        */
-      unmounted = is_device_unmounted(dev);
+      unmounted = dev->is_device_unmounted();
 
       if (!unmounted && dev->vol_poll_interval &&
           (total_waited >= dev->vol_poll_interval)) {
 
       if (!unmounted && dev->vol_poll_interval &&
           (total_waited >= dev->vol_poll_interval)) {