mirror of
https://github.com/owntone/owntone-server.git
synced 2025-07-20 14:01:17 -04:00
Merge remote-tracking branch 'origin/master' into web-3.0
This commit is contained in:
commit
eb33a25ce7
3
.github/workflows/macos.yml
vendored
3
.github/workflows/macos.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build tools
|
- name: Install build tools
|
||||||
run: brew install automake autoconf libtool pkg-config
|
run: brew install automake autoconf libtool pkg-config gettext
|
||||||
|
|
||||||
- name: Install gperf, bison and flex
|
- name: Install gperf, bison and flex
|
||||||
# macOS has ancient versions of bison and flex, so we need a newer from
|
# macOS has ancient versions of bison and flex, so we need a newer from
|
||||||
@ -58,6 +58,7 @@ jobs:
|
|||||||
# We configure a non-privileged setup, since how to add a "owntone" system
|
# We configure a non-privileged setup, since how to add a "owntone" system
|
||||||
# user in macOS isn't clear to me (useradd etc. isn't available)
|
# user in macOS isn't clear to me (useradd etc. isn't available)
|
||||||
run: |
|
run: |
|
||||||
|
export ACLOCAL_PATH="$(brew --prefix)/share/gettext/m4:$ACLOCAL_PATH"
|
||||||
export CFLAGS="-I$(brew --prefix)/include -I$(brew --prefix sqlite)/include"
|
export CFLAGS="-I$(brew --prefix)/include -I$(brew --prefix sqlite)/include"
|
||||||
export LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix sqlite)/lib"
|
export LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix sqlite)/lib"
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
2
.github/workflows/macos_12.yml
vendored
2
.github/workflows/macos_12.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install build tools
|
- name: Install build tools
|
||||||
run: brew install automake autoconf libtool pkg-config
|
run: brew install automake autoconf libtool pkg-config gettext
|
||||||
|
|
||||||
- name: Install gperf, bison and flex
|
- name: Install gperf, bison and flex
|
||||||
# macOS has ancient versions of bison and flex, so we need a newer from
|
# macOS has ancient versions of bison and flex, so we need a newer from
|
||||||
|
@ -3,6 +3,9 @@ AC_CONFIG_AUX_DIR([.])
|
|||||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
|
dnl Defines _GNU_SOURCE globally when needed
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_AR
|
AM_PROG_AR
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
@ -123,10 +123,10 @@ channel_new(struct sp_channel **new_channel, struct sp_session *session, const c
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (fcntl(channel->audio_fd[0], F_SETFL, O_CLOEXEC | O_NONBLOCK) < 0)
|
if (fcntl(channel->audio_fd[0], F_SETFL, FD_CLOEXEC | O_NONBLOCK) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (fcntl(channel->audio_fd[1], F_SETFL, O_CLOEXEC | O_NONBLOCK) < 0)
|
if (fcntl(channel->audio_fd[1], F_SETFL, FD_CLOEXEC | O_NONBLOCK) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
channel->audio_write_ev = event_new(evbase, channel->audio_fd[1], EV_WRITE, write_cb, session);
|
channel->audio_write_ev = event_new(evbase, channel->audio_fd[1], EV_WRITE, write_cb, session);
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
#define _GNU_SOURCE // For asprintf and vasprintf
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#define _GNU_SOURCE // For asprintf and vasprintf
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -861,6 +861,7 @@ request_headers_add(struct evrtsp_request *req, struct airplay_session *rs, enum
|
|||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
const char *user_agent;
|
const char *user_agent;
|
||||||
|
const char *client_name;
|
||||||
const char *method;
|
const char *method;
|
||||||
const char *url;
|
const char *url;
|
||||||
int ret;
|
int ret;
|
||||||
@ -873,6 +874,9 @@ request_headers_add(struct evrtsp_request *req, struct airplay_session *rs, enum
|
|||||||
user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");
|
user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");
|
||||||
evrtsp_add_header(req->output_headers, "User-Agent", user_agent);
|
evrtsp_add_header(req->output_headers, "User-Agent", user_agent);
|
||||||
|
|
||||||
|
client_name = cfg_getstr(cfg_getsec(cfg, "library"), "name");
|
||||||
|
evrtsp_add_header(req->output_headers, "X-Apple-Client-Name", client_name);
|
||||||
|
|
||||||
// If we have a realm + nonce it means that the device told us in the reply to
|
// If we have a realm + nonce it means that the device told us in the reply to
|
||||||
// SETUP that www authentication with password is required
|
// SETUP that www authentication with password is required
|
||||||
if (rs->realm && rs->nonce)
|
if (rs->realm && rs->nonce)
|
||||||
@ -2640,6 +2644,12 @@ static int
|
|||||||
payload_make_pin_start(struct evrtsp_request *req, struct airplay_session *rs, void *arg)
|
payload_make_pin_start(struct evrtsp_request *req, struct airplay_session *rs, void *arg)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_AIRPLAY, "Starting device pairing for '%s', go to the web interface and enter PIN\n", rs->devname);
|
DPRINTF(E_LOG, L_AIRPLAY, "Starting device pairing for '%s', go to the web interface and enter PIN\n", rs->devname);
|
||||||
|
|
||||||
|
if (rs->pair_type == PAIR_CLIENT_HOMEKIT_NORMAL)
|
||||||
|
evrtsp_add_header(req->output_headers, "X-Apple-HKP", "3");
|
||||||
|
else if (rs->pair_type == PAIR_CLIENT_HOMEKIT_TRANSIENT)
|
||||||
|
evrtsp_add_header(req->output_headers, "X-Apple-HKP", "4");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1109,6 +1109,7 @@ raop_add_headers(struct raop_session *rs, struct evrtsp_request *req, enum evrts
|
|||||||
const char *method;
|
const char *method;
|
||||||
const char *url;
|
const char *url;
|
||||||
const char *user_agent;
|
const char *user_agent;
|
||||||
|
const char *client_name;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
method = evrtsp_method(req_method);
|
method = evrtsp_method(req_method);
|
||||||
@ -1121,6 +1122,9 @@ raop_add_headers(struct raop_session *rs, struct evrtsp_request *req, enum evrts
|
|||||||
user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");
|
user_agent = cfg_getstr(cfg_getsec(cfg, "general"), "user_agent");
|
||||||
evrtsp_add_header(req->output_headers, "User-Agent", user_agent);
|
evrtsp_add_header(req->output_headers, "User-Agent", user_agent);
|
||||||
|
|
||||||
|
client_name = cfg_getstr(cfg_getsec(cfg, "library"), "name");
|
||||||
|
evrtsp_add_header(req->output_headers, "X-Apple-Client-Name", client_name);
|
||||||
|
|
||||||
/* Add Authorization header */
|
/* Add Authorization header */
|
||||||
url = (req_method == EVRTSP_REQ_OPTIONS) ? "*" : rs->session_url;
|
url = (req_method == EVRTSP_REQ_OPTIONS) ? "*" : rs->session_url;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user