mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-28 05:04:16 -05:00
More UPnP work. Almost finished with discovery.
This commit is contained in:
14
src/main.c
14
src/main.c
@@ -423,10 +423,6 @@ int main(int argc, char *argv[]) {
|
||||
VERSION,err_getlevel());
|
||||
|
||||
|
||||
#ifdef UPNP
|
||||
upnp_init();
|
||||
#endif
|
||||
|
||||
/* load plugins before we drop privs? Maybe... let the
|
||||
* plugins do stuff they might need to */
|
||||
plugin_init();
|
||||
@@ -476,6 +472,10 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
free(runas);
|
||||
|
||||
#ifdef UPNP
|
||||
upnp_init();
|
||||
#endif
|
||||
|
||||
/* this will require that the db be readable by the runas user */
|
||||
db_type = conf_alloc_string("general","db_type","sqlite");
|
||||
db_parms = conf_alloc_string("general","db_parms","/var/cache/mt-daapd");
|
||||
@@ -497,7 +497,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
/* Initialize the database before starting */
|
||||
DPRINTF(E_LOG,L_MAIN|L_DB,"Initializing database\n");
|
||||
if(db_init(&reload)) {
|
||||
if(db_init(reload)) {
|
||||
DPRINTF(E_FATAL,L_MAIN|L_DB,"Error in db_init: %s\n",strerror(errno));
|
||||
}
|
||||
|
||||
@@ -641,6 +641,10 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef UPNP
|
||||
upnp_deinit();
|
||||
#endif
|
||||
|
||||
|
||||
/* Got to find a cleaner way to stop the web server.
|
||||
* Closing the fd of the socking accepting doesn't necessarily
|
||||
|
||||
Reference in New Issue
Block a user