]> arthur.barton.de Git - netatalk.git/commitdiff
fix
authorFrank Lahm <franklahm@googlemail.com>
Wed, 20 Apr 2011 12:34:31 +0000 (14:34 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 20 Apr 2011 12:34:31 +0000 (14:34 +0200)
etc/cnid_dbd/cmd_dbd_scanvol.c

index 588da0db777591d0e25a4000d03b1d1b1ffb1ef2..e86d1978c3d9520d18f5d1f61975b0c32e6b74c2 100644 (file)
@@ -1258,10 +1258,10 @@ int cmd_dbd_scanvol(DBD *dbd_ref, struct volinfo *vi, dbd_flags_t flags)
 
 exit:
     if (! nocniddb) {
-        if (dbif_txn_close(dbd, 2) != 0)
+        if (dbif_txn_close(dbd, ret == 0 ? 1 : 0) != 0)
             ret = -1;
         if (dbd_rebuild)
-            if (dbif_txn_close(dbd_rebuild, 2) != 0)
+            if (dbif_txn_close(dbd_rebuild, ret == 0 ? 1 : 0) != 0)
                 ret = -1;
         if ((ret == 0) && dbd_rebuild && (flags & DBD_FLAGS_EXCL) && !(flags & DBD_FLAGS_FORCE))
             /* We can only do this in exclusive mode, otherwise we might delete CNIDs added from