]> git.sur5r.net Git - bacula/bacula/commitdiff
in status slots command, unlock db just after sql query
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 20 Aug 2009 19:42:05 +0000 (21:42 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 20 Aug 2009 19:42:05 +0000 (21:42 +0200)
bacula/src/dird/ua_label.c

index 6d7e9fe90e86289738d947ae51ae592b0dfcc909..83a1e7563f0ba3c981547f86feb5cebc3d92f798 100644 (file)
@@ -1123,6 +1123,7 @@ void status_slots(UAContext *ua, STORE *store_r)
          if (!db_get_pool_record(ua->jcr, ua->db, &pr)) {
             strcpy(pr.Name, "?");
          }
+         db_unlock(ua->db);
 
          if (ua->api) {
             ua->send_msg(slot_api_full_format,
@@ -1138,7 +1139,6 @@ void status_slots(UAContext *ua, STORE *store_r)
                          mr.VolumeName, mr.VolStatus, mr.MediaType, pr.Name);
          }
 
-         db_unlock(ua->db);
          continue;
       } else {                  /* TODO: get information from catalog  */
          if (ua->api) {