Browse Source

pianod: Update to latest version, refresh patches

Signed-off-by: Ted Hess <thess@kitschensync.net>
lilik-openwrt-22.03
Ted Hess 9 years ago
parent
commit
af696323a7
4 changed files with 10 additions and 85 deletions
  1. +4
    -4
      sound/pianod/Makefile
  2. +0
    -75
      sound/pianod/patches/005-Fix_IPV6_socket_handling.patch
  3. +1
    -1
      sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch
  4. +5
    -5
      sound/pianod/patches/030-Waitress_add_polarssl_variant.patch

+ 4
- 4
sound/pianod/Makefile View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=pianod PKG_NAME:=pianod
PKG_VERSION:=173
PKG_RELEASE:=3
PKG_VERSION:=174
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/ PKG_SOURCE_URL:=http://deviousfish.com/Downloads/pianod/
PKG_MD5SUM:=be0cec19ea6df1c4bc6c1cac8e253445
PKG_MD5SUM:=cca2143e4a5301dea8c0cb9fcbd20881
PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net> PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
@ -76,7 +76,7 @@ endef
define Build/Prepare define Build/Prepare
$(call Build/Prepare/Default) $(call Build/Prepare/Default)
ifneq ($(CONFIG_PACKAGE_pianod-client),) ifneq ($(CONFIG_PACKAGE_pianod-client),)
$(eval $(call Download,pianod-client))
$(call Download,pianod-client)
mkdir -p $(PKG_BUILD_DIR)/pianod-client mkdir -p $(PKG_BUILD_DIR)/pianod-client
$(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client $(TAR) -xf $(DL_DIR)/$(PIANOD_CLIENT) --strip=1 -C $(PKG_BUILD_DIR)/pianod-client
endif endif


+ 0
- 75
sound/pianod/patches/005-Fix_IPV6_socket_handling.patch View File

@ -1,75 +0,0 @@
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -805,34 +805,37 @@ static WaitressReturn_t WaitressConnect
int pollres;
/* we need shorter timeouts for connect() */
- fcntl (sock, F_SETFL, O_NONBLOCK);
+ pollres = fcntl (sock, F_SETFL, O_NONBLOCK);
+ assert (pollres != -1);
- /* increase socket receive buffer */
- const int sockopt = 256*1024;
- setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &sockopt,
- sizeof (sockopt));
-
- /* non-blocking connect will return immediately */
- connect (sock, gacurr->ai_addr, gacurr->ai_addrlen);
-
- pollres = WaitressPollLoop (sock, POLLOUT, waith->timeout);
- if (pollres == 0) {
- ret = WAITRESS_RET_TIMEOUT;
- } else if (pollres == -1) {
- ret = WAITRESS_RET_ERR;
- } else {
- /* check connect () return value */
- socklen_t pollresSize = sizeof (pollres);
- getsockopt (sock, SOL_SOCKET, SO_ERROR, &pollres,
- &pollresSize);
- if (pollres != 0) {
- ret = WAITRESS_RET_CONNECT_REFUSED;
+ if (connect (sock, gacurr->ai_addr, gacurr->ai_addrlen) != -1) {
+ /* working */
+ waith->request.sockfd = sock;
+ break;
+ } else if (errno == EINPROGRESS) {
+ /* wait for connect to succeed */
+ pollres = WaitressPollLoop (sock, POLLOUT, waith->timeout);
+ if (pollres == 0) {
+ ret = WAITRESS_RET_TIMEOUT;
+ } else if (pollres == -1) {
+ ret = WAITRESS_RET_ERR;
} else {
- /* this one is working */
- waith->request.sockfd = sock;
- break;
+ /* check connect () return value */
+ socklen_t pollresSize = sizeof (pollres);
+ getsockopt (sock, SOL_SOCKET, SO_ERROR, &pollres,
+ &pollresSize);
+ if (pollres != 0) {
+ ret = WAITRESS_RET_CONNECT_REFUSED;
+ } else {
+ /* this one is working */
+ waith->request.sockfd = sock;
+ break;
+ }
}
+ } else {
+ ret = WAITRESS_RET_ERR;
}
+
close (sock);
}
}
--- a/src/libfootball/fb_service.c
+++ b/src/libfootball/fb_service.c
@@ -111,6 +111,8 @@ static bool fb_setup_socket (FB_SERVICE
service->socket [which] = 0;
} else {
fb_perror ("socket");
+ // Element must be zero (not -1)
+ service->socket [which] = 0;
};
return false;
}

+ 1
- 1
sound/pianod/patches/020-Use_package_config_h_for_all_modules.patch View File

@ -19,7 +19,7 @@
--- a/src/libwaitress/waitress.c --- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c +++ b/src/libwaitress/waitress.c
@@ -918,14 +918,14 @@ static WaitressReturn_t WaitressSendRequ
@@ -922,14 +922,14 @@ static WaitressReturn_t WaitressSendRequ
if (WaitressProxyEnabled (waith) && !waith->url.tls) { if (WaitressProxyEnabled (waith) && !waith->url.tls) {
snprintf (buf, WAITRESS_BUFFER_SIZE, snprintf (buf, WAITRESS_BUFFER_SIZE,
"%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n" "%s http://%s:%s/%s HTTP/" WAITRESS_HTTP_VERSION "\r\n"


+ 5
- 5
sound/pianod/patches/030-Waitress_add_polarssl_variant.patch View File

@ -247,7 +247,7 @@
return WAITRESS_RET_OK; return WAITRESS_RET_OK;
} }
@@ -876,6 +947,12 @@ static WaitressReturn_t WaitressConnect
@@ -880,6 +951,12 @@ static WaitressReturn_t WaitressConnect
} }
} }
@ -260,7 +260,7 @@
/* Ignore return code as connection will likely still succeed */ /* Ignore return code as connection will likely still succeed */
gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS, gnutls_server_name_set (waith->request.tlsSession, GNUTLS_NAME_DNS,
waith->url.host, strlen (waith->url.host)); waith->url.host, strlen (waith->url.host));
@@ -883,14 +960,15 @@ static WaitressReturn_t WaitressConnect
@@ -887,14 +964,15 @@ static WaitressReturn_t WaitressConnect
if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) { if (gnutls_handshake (waith->request.tlsSession) != GNUTLS_E_SUCCESS) {
return WAITRESS_RET_TLS_HANDSHAKE_ERR; return WAITRESS_RET_TLS_HANDSHAKE_ERR;
} }
@ -278,7 +278,7 @@
} }
return WAITRESS_RET_OK; return WAITRESS_RET_OK;
@@ -1116,6 +1194,21 @@ WaitressReturn_t WaitressFetchCall (Wait
@@ -1120,6 +1198,21 @@ WaitressReturn_t WaitressFetchCall (Wait
waith->request.contentLengthKnown = false; waith->request.contentLengthKnown = false;
if (waith->url.tls) { if (waith->url.tls) {
@ -300,7 +300,7 @@
gnutls_init (&waith->request.tlsSession, GNUTLS_CLIENT); gnutls_init (&waith->request.tlsSession, GNUTLS_CLIENT);
gnutls_set_default_priority (waith->request.tlsSession); gnutls_set_default_priority (waith->request.tlsSession);
@@ -1133,6 +1226,7 @@ WaitressReturn_t WaitressFetchCall (Wait
@@ -1137,6 +1230,7 @@ WaitressReturn_t WaitressFetchCall (Wait
WaitressPollRead); WaitressPollRead);
gnutls_transport_set_push_function (waith->request.tlsSession, gnutls_transport_set_push_function (waith->request.tlsSession,
WaitressPollWrite); WaitressPollWrite);
@ -308,7 +308,7 @@
} }
/* buffer is required for connect already */ /* buffer is required for connect already */
@@ -1144,15 +1238,22 @@ WaitressReturn_t WaitressFetchCall (Wait
@@ -1148,15 +1242,22 @@ WaitressReturn_t WaitressFetchCall (Wait
if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) { if ((wRet = WaitressSendRequest (waith)) == WAITRESS_RET_OK) {
wRet = WaitressReceiveResponse (waith); wRet = WaitressReceiveResponse (waith);
} }


Loading…
Cancel
Save