mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-05 10:48:09 -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.h"
|
||||||
#include "httpd_rsp.h"
|
#include "httpd_rsp.h"
|
||||||
#include "httpd_daap.h"
|
#include "httpd_daap.h"
|
||||||
|
#include "httpd_dacp.h"
|
||||||
#include "transcode.h"
|
#include "transcode.h"
|
||||||
|
|
||||||
|
|
||||||
@ -818,6 +819,12 @@ httpd_gen_cb(struct evhttp_request *req, void *arg)
|
|||||||
{
|
{
|
||||||
daap_request(req);
|
daap_request(req);
|
||||||
|
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
else if (dacp_is_request(req, uri))
|
||||||
|
{
|
||||||
|
dacp_request(req);
|
||||||
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1074,6 +1081,14 @@ httpd_init(void)
|
|||||||
goto daap_fail;
|
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__)
|
#if defined(__linux__)
|
||||||
ret = pipe2(exit_pipe, O_CLOEXEC);
|
ret = pipe2(exit_pipe, O_CLOEXEC);
|
||||||
#else
|
#else
|
||||||
@ -1145,6 +1160,8 @@ httpd_init(void)
|
|||||||
close(exit_pipe[0]);
|
close(exit_pipe[0]);
|
||||||
close(exit_pipe[1]);
|
close(exit_pipe[1]);
|
||||||
pipe_fail:
|
pipe_fail:
|
||||||
|
dacp_deinit();
|
||||||
|
dacp_fail:
|
||||||
daap_deinit();
|
daap_deinit();
|
||||||
daap_fail:
|
daap_fail:
|
||||||
rsp_deinit();
|
rsp_deinit();
|
||||||
@ -1176,6 +1193,7 @@ httpd_deinit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rsp_deinit();
|
rsp_deinit();
|
||||||
|
dacp_deinit();
|
||||||
daap_deinit();
|
daap_deinit();
|
||||||
|
|
||||||
close(exit_pipe[0]);
|
close(exit_pipe[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user