*/
/* Check that the tables correspond to the version we want */
-int check_tables_version(void *jcr, B_DB *mdb)
+int check_tables_version(JCR *jcr, B_DB *mdb)
{
uint32_t version;
char *query = "SELECT VersionId FROM Version";
/* Utility routine for queries. The database MUST be locked before calling here. */
int
-QueryDB(char *file, int line, void *jcr, B_DB *mdb, char *cmd)
+QueryDB(char *file, int line, JCR *jcr, B_DB *mdb, char *cmd)
{
int status;
if ((status=sql_query(mdb, cmd)) != 0) {
* 1 on success
*/
int
-InsertDB(char *file, int line, void *jcr, B_DB *mdb, char *cmd)
+InsertDB(char *file, int line, JCR *jcr, B_DB *mdb, char *cmd)
{
if (sql_query(mdb, cmd)) {
m_msg(file, line, &mdb->errmsg, _("insert %s failed:\n%s\n"), cmd, sql_strerror(mdb));
* 1 on success
*/
int
-UpdateDB(char *file, int line, void *jcr, B_DB *mdb, char *cmd)
+UpdateDB(char *file, int line, JCR *jcr, B_DB *mdb, char *cmd)
{
if (sql_query(mdb, cmd)) {
* n number of rows affected
*/
int
-DeleteDB(char *file, int line, void *jcr, B_DB *mdb, char *cmd)
+DeleteDB(char *file, int line, JCR *jcr, B_DB *mdb, char *cmd)
{
if (sql_query(mdb, cmd)) {
* Returns: -1 on failure
* count on success
*/
-int get_sql_record_max(void *jcr, B_DB *mdb)
+int get_sql_record_max(JCR *jcr, B_DB *mdb)
{
SQL_ROW row;
int stat = 0;
* much more efficient. Usually started when inserting
* file attributes.
*/
-void db_start_transaction(void *jcr, B_DB *mdb)
+void db_start_transaction(JCR *jcr, B_DB *mdb)
{
#ifdef xAVE_SQLITE
db_lock(mdb);
}
-void db_end_transaction(void *jcr, B_DB *mdb)
+void db_end_transaction(JCR *jcr, B_DB *mdb)
{
#ifdef xAVE_SQLITE
db_lock(mdb);
* and filename parts. They are returned in pool memory
* in the mdb structure.
*/
-void split_path_and_filename(void *jcr, B_DB *mdb, char *fname)
+void split_path_and_filename(JCR *jcr, B_DB *mdb, char *fname)
{
char *p, *f;