summaryrefslogtreecommitdiff
path: root/libshout
diff options
context:
space:
mode:
authorDanny Rawlins <monster.romster@gmail.com>2020-01-12 17:42:06 +1100
committerDanny Rawlins <monster.romster@gmail.com>2020-01-12 17:42:06 +1100
commit926d182771b88ec34942c1d125bde79d6d0aa951 (patch)
treeef31c2bb5b8aec818a5ae29a6a1fd35818e29c49 /libshout
parentf5e749e45bc051ab6296ea1298afccfdc810160c (diff)
downloadcontrib-926d182771b88ec34942c1d125bde79d6d0aa951.tar.gz
contrib-926d182771b88ec34942c1d125bde79d6d0aa951.tar.xz
libshout: 2.4.2 -> 2.4.3
Diffstat (limited to 'libshout')
-rw-r--r--libshout/.signature8
-rw-r--r--libshout/Pkgfile11
-rw-r--r--libshout/corrected-blocking-state.patch125
-rw-r--r--libshout/icy-port-increment.patch29
4 files changed, 166 insertions, 7 deletions
diff --git a/libshout/.signature b/libshout/.signature
index 42e0dc72b..349e91e39 100644
--- a/libshout/.signature
+++ b/libshout/.signature
@@ -1,5 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF391j3eOTUjuboSPxSNwA7+0MCl9pvTjoxOyrvdD19ah1oX0ggGzW+w44QX2kvEKncQTeLL8rLOha0o1vR8L5OQo=
-SHA256 (Pkgfile) = 92fef6b9048b83100bee9f7f5aff76d1481a112044008bd621d5ba00702fbcf5
+RWSagIOpLGJF3xNMQtDHj0lTlSvmUvm2xtEJvb0Ljsn08awmcls3KtZsAZU8OeP2ex71lrrhKSjzTdeC28Qw0Wm+SZV2DuDufQs=
+SHA256 (Pkgfile) = 514f3f9d53fdf94b23dd546e4283196b83b5de6e256c95beede7abceabadfb81
SHA256 (.footprint) = 8a13af6b11d139f8392db54d91744aedd55dfe4d8e3d8dcc73c0837ca861a137
-SHA256 (libshout-2.4.2.tar.gz) = d51ba4003ca2b81669d37430beaa584e868fe46f46b7a6fef0d25c717156fc61
+SHA256 (libshout-2.4.3.tar.gz) = 0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe
+SHA256 (corrected-blocking-state.patch) = 7ffe6bb1b556ec02be0664a060877b4f6adcf7d2340b12d73317d0384343d1b2
+SHA256 (icy-port-increment.patch) = 737cff04da572fbdf1f15a6c33714346e13b23657bc15872917b94daa0f46ce4
diff --git a/libshout/Pkgfile b/libshout/Pkgfile
index 72a44edd8..0c580a0b5 100644
--- a/libshout/Pkgfile
+++ b/libshout/Pkgfile
@@ -4,19 +4,22 @@
# Depends on: libtheora openssl speex
name=libshout
-version=2.4.2
+version=2.4.3
release=1
-source=(https://downloads.us.xiph.org/releases/$name/$name-$version.tar.gz)
+source=(https://downloads.us.xiph.org/releases/$name/$name-$version.tar.gz
+ corrected-blocking-state.patch
+ icy-port-increment.patch)
build() {
cd $name-$version
- sed -e 's/SSLeay_add_all_algorithms/OpenSSL_add_all_algorithms/g' -i src/tls.c
+ patch -p1 -i $SRC/corrected-blocking-state.patch
+ patch -p1 -i $SRC/icy-port-increment.patch
./configure --prefix=/usr
make
make install DESTDIR=$PKG
- rm -r $PKG/usr/share/doc/
+ rm -r $PKG/usr/share/doc
}
diff --git a/libshout/corrected-blocking-state.patch b/libshout/corrected-blocking-state.patch
new file mode 100644
index 000000000..c76cc5507
--- /dev/null
+++ b/libshout/corrected-blocking-state.patch
@@ -0,0 +1,125 @@
+From 0ac7ed9e84c3871d4427acc1ce59dca5e4af21ef Mon Sep 17 00:00:00 2001
+From: Philipp Schafft <lion@lion.leolix.org>
+Date: Wed, 26 Jun 2019 18:58:44 +0000
+Subject: [PATCH] Fix: Corrected blocking state of connections
+
+Thanks to Bernd Geiser <bg@ferncast.de> for initial report.
+
+Fixes: #2309
+---
+ include/shout/shout.h.in | 8 +++++++-
+ src/connection.c | 13 +++++++------
+ src/shout.c | 7 +++++--
+ 3 files changed, 19 insertions(+), 9 deletions(-)
+
+diff --git a/include/shout/shout.h.in b/include/shout/shout.h.in
+index 6fda58b..297ff17 100644
+--- a/include/shout/shout.h.in
++++ b/include/shout/shout.h.in
+@@ -85,6 +85,11 @@ extern "C" {
+ #define SHOUT_TLS_RFC2818 ( 11) /* Use TLS for transport layer like HTTPS [RFC2818] does. */
+ #define SHOUT_TLS_RFC2817 ( 12) /* Use TLS via HTTP Upgrade:-header [RFC2817]. */
+
++/* Possible values for blocking */
++#define SHOUT_BLOCKING_DEFAULT (255) /* Use the default blocking setting. */
++#define SHOUT_BLOCKING_FULL ( 0) /* Block in all I/O related functions */
++#define SHOUT_BLOCKING_NONE ( 1) /* Do not block in I/O related functions */
++
+ #define SHOUT_AI_BITRATE "bitrate"
+ #define SHOUT_AI_SAMPLERATE "samplerate"
+ #define SHOUT_AI_CHANNELS "channels"
+@@ -244,7 +249,8 @@ int shout_set_protocol(shout_t *self, unsigned int protocol);
+ unsigned int shout_get_protocol(shout_t *self);
+
+ /* Instructs libshout to use nonblocking I/O. Must be called before
+- * shout_open (no switching back and forth midstream at the moment). */
++ * shout_open (no switching back and forth midstream at the moment).
++ * nonblocking is one of SHOUT_BLOCKING_xxx. */
+ int shout_set_nonblocking(shout_t* self, unsigned int nonblocking);
+ unsigned int shout_get_nonblocking(shout_t *self);
+
+diff --git a/src/connection.c b/src/connection.c
+index 07fc587..01b15ba 100644
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -118,7 +118,7 @@ static struct timeval shout_connection_iter__wait_for_io__get_timeout(shout_conn
+ .tv_usec = (timeout % 1000) * 1000
+ };
+ return tv;
+- } else if (con->nonblocking) {
++ } else if (con->nonblocking == SHOUT_BLOCKING_NONE) {
+ return tv_nonblocking;
+ } else {
+ return tv_blocking;
+@@ -167,7 +167,7 @@ static shout_connection_return_state_t shout_connection_iter__socket(shout_conne
+ }
+ break;
+ case SHOUT_SOCKSTATE_CONNECTING:
+- if (con->nonblocking) {
++ if (con->nonblocking == SHOUT_BLOCKING_NONE) {
+ ret = shout_connection_iter__wait_for_io(con, shout, 1, 1, 0);
+ if (ret != SHOUT_RS_DONE) {
+ return ret;
+@@ -460,7 +460,7 @@ int shout_connection_iter(shout_connection_t *con, shout_t *shou
+ break; \
+ case SHOUT_RS_TIMEOUT: \
+ case SHOUT_RS_NOTNOW: \
+- if (con->nonblocking) \
++ if (con->nonblocking == SHOUT_BLOCKING_NONE) \
+ return SHOUTERR_RETRY; \
+ retry = 1; \
+ break; \
+@@ -518,7 +518,7 @@ int shout_connection_select_tlsmode(shout_connection_t *con, int
+ }
+ int shout_connection_set_nonblocking(shout_connection_t *con, unsigned int nonblocking)
+ {
+- if (!con)
++ if (!con || (nonblocking != SHOUT_BLOCKING_DEFAULT && nonblocking != SHOUT_BLOCKING_FULL && nonblocking != SHOUT_BLOCKING_NONE))
+ return SHOUTERR_INSANE;
+
+ if (con->socket != SOCK_ERROR)
+@@ -563,13 +563,14 @@ int shout_connection_connect(shout_connection_t *con, shout_t *s
+ if (con->socket != SOCK_ERROR || con->current_socket_state != SHOUT_SOCKSTATE_UNCONNECTED)
+ return SHOUTERR_BUSY;
+
+- shout_connection_set_nonblocking(con, shout_get_nonblocking(shout));
++ if (con->nonblocking == SHOUT_BLOCKING_DEFAULT)
++ shout_connection_set_nonblocking(con, shout_get_nonblocking(shout));
+
+ port = shout->port;
+ if (shout_get_protocol(shout) == SHOUT_PROTOCOL_ICY)
+ port++;
+
+- if (con->nonblocking) {
++ if (con->nonblocking == SHOUT_BLOCKING_NONE) {
+ con->socket = sock_connect_non_blocking(shout->host, port);
+ } else {
+ con->socket = sock_connect(shout->host, port);
+diff --git a/src/shout.c b/src/shout.c
+index 1439c14..9845d13 100644
+--- a/src/shout.c
++++ b/src/shout.c
+@@ -417,7 +417,7 @@ int shout_set_metadata(shout_t *self, shout_metadata_t *metadata)
+ #ifdef HAVE_OPENSSL
+ shout_connection_select_tlsmode(connection, self->tls_mode);
+ #endif
+- shout_connection_set_nonblocking(connection, 0);
++ shout_connection_set_nonblocking(connection, SHOUT_BLOCKING_FULL);
+
+ connection->target_message_state = SHOUT_MSGSTATE_PARSED_FINAL;
+
+@@ -989,7 +989,10 @@ unsigned int shout_get_protocol(shout_t *self)
+
+ int shout_set_nonblocking(shout_t *self, unsigned int nonblocking)
+ {
+- if (!self || (nonblocking != 0 && nonblocking != 1))
++ if (nonblocking == SHOUT_BLOCKING_DEFAULT)
++ nonblocking = SHOUT_BLOCKING_FULL;
++
++ if (!self || (nonblocking != SHOUT_BLOCKING_FULL && nonblocking != SHOUT_BLOCKING_NONE))
+ return SHOUTERR_INSANE;
+
+ if (self->connection)
+--
+2.22.0
+
diff --git a/libshout/icy-port-increment.patch b/libshout/icy-port-increment.patch
new file mode 100644
index 000000000..423e73ee8
--- /dev/null
+++ b/libshout/icy-port-increment.patch
@@ -0,0 +1,29 @@
+From b807c1e2550718bdc73d65ac1b05255d18f45c54 Mon Sep 17 00:00:00 2001
+From: Philipp Schafft <lion@lion.leolix.org>
+Date: Wed, 26 Jun 2019 19:30:25 +0000
+Subject: [PATCH] Fix: Do the ICY port increment only when using the ICY
+ implementation
+
+This makes metadata work again on ICY servers.
+
+Fixes: #2310
+---
+ src/connection.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/connection.c b/src/connection.c
+index 01b15ba..0fd00ab 100644
+--- a/src/connection.c
++++ b/src/connection.c
+@@ -567,7 +567,7 @@ int shout_connection_connect(shout_connection_t *con, shout_t *s
+ shout_connection_set_nonblocking(con, shout_get_nonblocking(shout));
+
+ port = shout->port;
+- if (shout_get_protocol(shout) == SHOUT_PROTOCOL_ICY)
++ if (con->impl == shout_icy_impl)
+ port++;
+
+ if (con->nonblocking == SHOUT_BLOCKING_NONE) {
+--
+2.22.0
+

Generated by cgit