From owner-svn-ports-all@freebsd.org Tue Sep 3 19:12:47 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38DCBD28A9; Tue, 3 Sep 2019 19:12:47 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46NGmv0k3dz49xl; Tue, 3 Sep 2019 19:12:47 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFC6B7AB1; Tue, 3 Sep 2019 19:12:46 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x83JCkuA050834; Tue, 3 Sep 2019 19:12:46 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x83JCkIs050830; Tue, 3 Sep 2019 19:12:46 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <201909031912.x83JCkIs050830@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Tue, 3 Sep 2019 19:12:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r511026 - in head/audio/libshout: . files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: in head/audio/libshout: . files X-SVN-Commit-Revision: 511026 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2019 19:12:47 -0000 Author: sunpoet Date: Tue Sep 3 19:12:45 2019 New Revision: 511026 URL: https://svnweb.freebsd.org/changeset/ports/511026 Log: Fix blocking state of connections - Bump PORTREVISION for package change PR: 240222 Submitted by: acm Obtained from: https://gitlab.xiph.org/xiph/icecast-libshout/commit/0ac7ed9e84c3871d4427acc1ce59dca5e4af21ef https://gitlab.xiph.org/xiph/icecast-libshout/commit/b807c1e2550718bdc73d65ac1b05255d18f45c54 Added: head/audio/libshout/files/ head/audio/libshout/files/patch-include-shout-shout.h.in (contents, props changed) head/audio/libshout/files/patch-src-connection.c (contents, props changed) head/audio/libshout/files/patch-src-shout.c (contents, props changed) Modified: head/audio/libshout/Makefile Modified: head/audio/libshout/Makefile ============================================================================== --- head/audio/libshout/Makefile Tue Sep 3 19:12:40 2019 (r511025) +++ head/audio/libshout/Makefile Tue Sep 3 19:12:45 2019 (r511026) @@ -3,7 +3,7 @@ PORTNAME= libshout PORTVERSION= 2.4.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio net MASTER_SITES= https://downloads.xiph.org/releases/libshout/ \ https://svn.xiph.org/releases/libshout/ \ Added: head/audio/libshout/files/patch-include-shout-shout.h.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/libshout/files/patch-include-shout-shout.h.in Tue Sep 3 19:12:45 2019 (r511026) @@ -0,0 +1,26 @@ +Obtained from: https://gitlab.xiph.org/xiph/icecast-libshout/commit/0ac7ed9e84c3871d4427acc1ce59dca5e4af21ef + +--- include/shout/shout.h.in.orig 2019-05-22 09:05:32 UTC ++++ 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, un + 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); + Added: head/audio/libshout/files/patch-src-connection.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/libshout/files/patch-src-connection.c Tue Sep 3 19:12:45 2019 (r511026) @@ -0,0 +1,59 @@ +Obtained from: https://gitlab.xiph.org/xiph/icecast-libshout/commit/0ac7ed9e84c3871d4427acc1ce59dca5e4af21ef + https://gitlab.xiph.org/xiph/icecast-libshout/commit/b807c1e2550718bdc73d65ac1b05255d18f45c54 + +--- src/connection.c.orig 2019-05-20 19:32:59 UTC ++++ src/connection.c +@@ -118,7 +118,7 @@ static struct timeval shout_connection_i + .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 s + } + 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_ite + 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_sel + } + 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_con + 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) ++ if (con->impl == shout_icy_impl) + 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); Added: head/audio/libshout/files/patch-src-shout.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/libshout/files/patch-src-shout.c Tue Sep 3 19:12:45 2019 (r511026) @@ -0,0 +1,25 @@ +Obtained from: https://gitlab.xiph.org/xiph/icecast-libshout/commit/0ac7ed9e84c3871d4427acc1ce59dca5e4af21ef + +--- src/shout.c.orig 2019-05-22 09:05:32 UTC ++++ src/shout.c +@@ -417,7 +417,7 @@ int shout_set_metadata(shout_t *self, sh + #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 + + 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)