add db_type and db_parameters for specifying different backend databases

This commit is contained in:
Ron Pedde
2006-01-06 00:05:02 +00:00
parent 56502cee62
commit e0ce8f273f
5 changed files with 33 additions and 40 deletions

View File

@@ -360,6 +360,7 @@ int main(int argc, char *argv[]) {
int pid_fd;
FILE *pid_fp=NULL;
int err;
char *perr;
config.use_mdns=1;
@@ -483,7 +484,13 @@ int main(int argc, char *argv[]) {
}
/* this will require that the db be readable by the runas user */
if(db_open(&perr,config.dbdir))
if(config.dbtype) {
err=db_open(&perr,config.dbtype,config.dbparms);
} else {
err=db_open(&perr,NULL,config.dbdir);
}
if(err)
DPRINTF(E_FATAL,L_MAIN|L_DB,"Error in db_open: %s\n",perr);
/* Initialize the database before starting */