mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 08:33:23 -05:00
Add Remote pairing services start/stop
This commit is contained in:
parent
c191aff5cd
commit
3c7456f545
15
src/main.c
15
src/main.c
@ -58,6 +58,7 @@
|
|||||||
#include "filescanner.h"
|
#include "filescanner.h"
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "mdns_avahi.h"
|
#include "mdns_avahi.h"
|
||||||
|
#include "remote_pairing.h"
|
||||||
|
|
||||||
|
|
||||||
#define PIDFILE STATEDIR "/run/" PACKAGE ".pid"
|
#define PIDFILE STATEDIR "/run/" PACKAGE ".pid"
|
||||||
@ -621,6 +622,16 @@ main(int argc, char **argv)
|
|||||||
goto httpd_fail;
|
goto httpd_fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Start Remote pairing service */
|
||||||
|
ret = remote_pairing_init();
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
DPRINTF(E_FATAL, L_MAIN, "Remote pairing service failed to start\n");
|
||||||
|
|
||||||
|
ret = EXIT_FAILURE;
|
||||||
|
goto remote_fail;
|
||||||
|
}
|
||||||
|
|
||||||
/* Register mDNS services */
|
/* Register mDNS services */
|
||||||
ret = register_services(ffid, mdns_no_rsp, mdns_no_daap);
|
ret = register_services(ffid, mdns_no_rsp, mdns_no_daap);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -687,6 +698,10 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
signalfd_fail:
|
signalfd_fail:
|
||||||
mdns_reg_fail:
|
mdns_reg_fail:
|
||||||
|
DPRINTF(E_LOG, L_MAIN, "Remote pairing deinit\n");
|
||||||
|
remote_pairing_deinit();
|
||||||
|
|
||||||
|
remote_fail:
|
||||||
DPRINTF(E_LOG, L_MAIN, "HTTPd deinit\n");
|
DPRINTF(E_LOG, L_MAIN, "HTTPd deinit\n");
|
||||||
httpd_deinit();
|
httpd_deinit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user