mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-24 11:59:16 -05:00
Wire up DAAP support
This commit is contained in:
parent
00876facde
commit
c071a58c3c
19
src/httpd.c
19
src/httpd.c
@ -41,6 +41,7 @@
|
||||
#include "conffile.h"
|
||||
#include "httpd.h"
|
||||
#include "httpd_rsp.h"
|
||||
#include "httpd_daap.h"
|
||||
|
||||
|
||||
/*
|
||||
@ -564,6 +565,13 @@ webface_cb(struct evhttp_request *req, void *arg)
|
||||
{
|
||||
rsp_request(req);
|
||||
|
||||
free(uri);
|
||||
return;
|
||||
}
|
||||
else if (daap_is_request(req, uri))
|
||||
{
|
||||
daap_request(req);
|
||||
|
||||
free(uri);
|
||||
return;
|
||||
}
|
||||
@ -613,6 +621,14 @@ httpd_init(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = daap_init();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_FATAL, L_HTTPD, "DAAP protocol init failed\n");
|
||||
|
||||
goto daap_fail;
|
||||
}
|
||||
|
||||
ret = pipe2(exit_pipe, O_CLOEXEC);
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -680,6 +696,8 @@ httpd_init(void)
|
||||
close(exit_pipe[0]);
|
||||
close(exit_pipe[1]);
|
||||
pipe_fail:
|
||||
daap_deinit();
|
||||
daap_fail:
|
||||
rsp_deinit();
|
||||
|
||||
return -1;
|
||||
@ -709,6 +727,7 @@ httpd_deinit(void)
|
||||
}
|
||||
|
||||
rsp_deinit();
|
||||
daap_deinit();
|
||||
|
||||
close(exit_pipe[0]);
|
||||
close(exit_pipe[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user