]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/bdb_delete.c
Tweak mutex order for SD
[bacula/bacula] / bacula / src / cats / bdb_delete.c
index 8059a83659ef8a225c21900d75864a0f01bb2be4..aa404f1199eaae6c0d768228f2990799814b057a 100644 (file)
@@ -21,8 +21,8 @@
    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
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,7 +34,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
  */
 int db_delete_pool_record(JCR *jcr, B_DB *mdb, POOL_DBR *pr)
 {
-   int stat;
-   POOL_DBR opr;
-
-   db_lock(mdb);
-   pr->PoolId = 0;                    /* Search on Pool Name */
-   if (!db_get_pool_record(jcr, mdb, pr)) {
-      Mmsg1(&mdb->errmsg, "No pool record %s exists\n", pr->Name);
-      db_unlock(mdb);
-      return 0;
-   }
-   fseek(mdb->poolfd, pr->rec_addr, SEEK_SET);
-   memset(&opr, 0, sizeof(opr));
-   stat = fwrite(&opr, sizeof(opr), 1, mdb->poolfd);
-   db_unlock(mdb);
-   return stat;
+   return 0;
 }
 
 int db_delete_media_record(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
 {
-   int stat;
-   MEDIA_DBR omr;
-
-   db_lock(mdb);
-   if (!db_get_media_record(jcr, mdb, mr)) {
-      Mmsg0(&mdb->errmsg, "Media record not found.\n");
-      db_unlock(mdb);
-      return 0;
-   }
-   fseek(mdb->mediafd, mr->rec_addr, SEEK_SET);
-   memset(&omr, 0, sizeof(omr));
-   stat = fwrite(&omr, sizeof(omr), 1, mdb->mediafd);
-   db_unlock(mdb);
-   return stat;
+   return 0;
 }
 
 #endif /* HAVE_BACULA_DB */