mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
Wire up DACP support
This commit is contained in:
parent
a52ff42697
commit
8ac5f48fe6
18
src/httpd.c
18
src/httpd.c
@ -44,6 +44,7 @@
|
||||
#include "httpd.h"
|
||||
#include "httpd_rsp.h"
|
||||
#include "httpd_daap.h"
|
||||
#include "httpd_dacp.h"
|
||||
#include "transcode.h"
|
||||
|
||||
|
||||
@ -818,6 +819,12 @@ httpd_gen_cb(struct evhttp_request *req, void *arg)
|
||||
{
|
||||
daap_request(req);
|
||||
|
||||
goto out;
|
||||
}
|
||||
else if (dacp_is_request(req, uri))
|
||||
{
|
||||
dacp_request(req);
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -1074,6 +1081,14 @@ httpd_init(void)
|
||||
goto daap_fail;
|
||||
}
|
||||
|
||||
ret = dacp_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_FATAL, L_HTTPD, "DACP protocol init failed\n");
|
||||
|
||||
goto dacp_fail;
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
ret = pipe2(exit_pipe, O_CLOEXEC);
|
||||
#else
|
||||
@ -1145,6 +1160,8 @@ httpd_init(void)
|
||||
close(exit_pipe[0]);
|
||||
close(exit_pipe[1]);
|
||||
pipe_fail:
|
||||
dacp_deinit();
|
||||
dacp_fail:
|
||||
daap_deinit();
|
||||
daap_fail:
|
||||
rsp_deinit();
|
||||
@ -1176,6 +1193,7 @@ httpd_deinit(void)
|
||||
}
|
||||
|
||||
rsp_deinit();
|
||||
dacp_deinit();
|
||||
daap_deinit();
|
||||
|
||||
close(exit_pipe[0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user