]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Fix bad patch for autoselect
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 14 Jun 2008 08:29:53 +0000 (08:29 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 14 Jun 2008 08:29:53 +0000 (08:29 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7136 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/stored/reserve.c

index 18b0787f21c79c6f745aa1e75c4b621a138f35e9..47a6759dfa221fb88b9000c553e331d49d36c9a1 100644 (file)
@@ -1088,16 +1088,16 @@ int search_res_for_device(RCTX &rctx)
    /* Look through Autochangers first */
    foreach_res(changer, R_AUTOCHANGER) {
       Dmsg1(dbglvl, "Try match changer res=%s\n", changer->hdr.name);
-      if (!rctx.device->autoselect) {
-         Dmsg1(100, "Device %s not autoselect skipped.\n",
-         rctx.device->hdr.name);
-         continue;              /* device is not available */
-      }
       /* Find resource, and make sure we were able to open it */
       if (strcmp(rctx.device_name, changer->hdr.name) == 0) {
          /* Try each device in this AutoChanger */
          foreach_alist(rctx.device, changer->device) {
             Dmsg1(dbglvl, "Try changer device %s\n", rctx.device->hdr.name);
+            if (!rctx.device->autoselect) {
+               Dmsg1(100, "Device %s not autoselect skipped.\n",
+               rctx.device->hdr.name);
+               continue;              /* device is not available */
+            }
             stat = reserve_device(rctx);
             if (stat != 1) {             /* try another device */
                continue;