]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/sqlite.c
bat: Use BVFS on bRestore view
[bacula/bacula] / bacula / src / cats / sqlite.c
index c90195a35c47234b052163b525d9e626418a5e8c..bc2458a731f167b54595849bed63f973f2c11d69 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
-   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.
 
@@ -15,7 +15,7 @@
    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.
@@ -308,7 +308,7 @@ int db_next_index(JCR *jcr, B_DB *mdb, char *table, char *index)
  * TODO: this should be implemented  (escape \0)
  */
 char *
-db_escape_object(JCR *jcr, B_DB *db, char *old, int len)
+db_escape_object(JCR *jcr, B_DB *mdb, char *old, int len)
 {
    char *n, *o;
 
@@ -337,12 +337,11 @@ db_escape_object(JCR *jcr, B_DB *db, char *old, int len)
 
 /*
  * Unescape binary object so that SQLIte is happy
- * Memory is stored in B_DB struct, no need to free it
  *
  * TODO: need to be implemented (escape \0)
  */
 void
-db_unescape_object(JCR *jcr, B_DB *db, 
+db_unescape_object(JCR *jcr, B_DB *mdb, 
                    char *from, int32_t expected_len, 
                    POOLMEM **dest, int32_t *dest_len)
 {
@@ -365,7 +364,7 @@ db_unescape_object(JCR *jcr, B_DB *db,
  *         the escaped output.
  */
 void
-db_escape_string(JCR *jcr, B_DB *db, char *snew, char *old, int len)
+db_escape_string(JCR *jcr, B_DB *mdb, char *snew, char *old, int len)
 {
    char *n, *o;
 
@@ -557,7 +556,7 @@ SQL_FIELD *my_sqlite_fetch_field(B_DB *mdb)
    }
 }
 
-int my_sqlite_insert_autokey_record(B_DB *mdb, const char *query, const char *table_name)
+uint64_t my_sqlite_insert_autokey_record(B_DB *mdb, const char *query, const char *table_name)
 {
    /*
     * First execute the insert query and then retrieve the currval.