mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 14:09:51 -05:00
start of UPnP functions
This commit is contained in:
@@ -54,6 +54,10 @@ if COND_GDBM
|
||||
GDBM=db-gdbm.c db-gdbm.h
|
||||
endif
|
||||
|
||||
if COND_UPNP
|
||||
UPNP=upnp.c upnp.h
|
||||
endif
|
||||
|
||||
wavstreamer_SOURCES = wavstreamer.c
|
||||
|
||||
mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \
|
||||
@@ -67,7 +71,8 @@ mt_daapd_SOURCES = main.c daapd.h rend.h uici.c uici.h webserver.c \
|
||||
os-unix.h os-unix.c os.h plugin.c plugin.h db-sql-updates.c \
|
||||
memdebug.c memdebug.h \
|
||||
$(PRENDSRC) $(ORENDSRC) $(HRENDSRC) $(ARENDSRC) $(OGGVORBISSRC) \
|
||||
$(FLACSRC) $(MUSEPACKSRC) $(SQLITEDB) $(SQLITE3DB) $(SQLDB) $(GDBM)
|
||||
$(FLACSRC) $(MUSEPACKSRC) $(SQLITEDB) $(SQLITE3DB) $(SQLDB) $(GDBM) \
|
||||
$(UPNP)
|
||||
|
||||
EXTRA_DIST = rend-howl.c rend-posix.c rend-osx.c scan-mpc.c \
|
||||
scan-ogg.c scan-flac.c db-sql.c db-sql.h \
|
||||
@@ -75,4 +80,4 @@ EXTRA_DIST = rend-howl.c rend-posix.c rend-osx.c scan-mpc.c \
|
||||
db-sql-sqlite3.h db-sql-sqlite3.c \
|
||||
w32-eventlog.c w32-eventlog.h w32-service.c w32-service.h \
|
||||
os-win32.h os-win32.c win32.h db-gdbm.c db-gdbm.h \
|
||||
ff-plugins.h ff-dbstruct.h
|
||||
ff-plugins.h ff-dbstruct.h upnp.c upnp.h
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
#include "os.h"
|
||||
#include "plugin.h"
|
||||
#include "util.h"
|
||||
#include "upnp.h"
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
# include "getopt.h"
|
||||
@@ -421,6 +422,11 @@ int main(int argc, char *argv[]) {
|
||||
DPRINTF(E_LOG,L_MAIN,"Firefly Version %s: Starting with debuglevel %d\n",
|
||||
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();
|
||||
@@ -583,6 +589,8 @@ int main(int argc, char *argv[]) {
|
||||
config.reload = 1; /* force a reload on start */
|
||||
|
||||
while(!config.stop) {
|
||||
upnp_tick(); /* run the upnp loop */
|
||||
|
||||
if((conf_get_int("general","rescan_interval",0) &&
|
||||
(rescan_counter > conf_get_int("general","rescan_interval",0)))) {
|
||||
if((conf_get_int("general","always_scan",0)) ||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
#define PATHSEP '/'
|
||||
#define PATHSEP_STR "/"
|
||||
#define OS_SOCKETTYPE unsigned int
|
||||
|
||||
/* unix-specific functions */
|
||||
extern int os_drop_privs(char *user);
|
||||
void os_set_pidfile(char *file);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ typedef enum {
|
||||
l_conf,
|
||||
l_plugin,
|
||||
l_memdebug,
|
||||
l_upnp,
|
||||
l_last
|
||||
} ff_lock_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user