From 518148ecdf2edbc682c2a4f203d14e40f422e38a Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 10 Sep 2005 16:42:01 +0000 Subject: [PATCH] SHOUTcast Distributed Network Audio Server just disconnects if there is no user-agent identification. From: Frank Ruell --- audio/mpg321/Makefile | 3 ++- audio/mpg321/patches/patch-mpg321_c | 14 +++++++------- audio/mpg321/patches/patch-network_c | 13 +++++++++++++ 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 audio/mpg321/patches/patch-network_c diff --git a/audio/mpg321/Makefile b/audio/mpg321/Makefile index f119082847e..0a3b8ec0ea0 100644 --- a/audio/mpg321/Makefile +++ b/audio/mpg321/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2004/11/21 17:51:46 espie Exp $ +# $OpenBSD: Makefile,v 1.16 2005/09/10 16:42:01 naddy Exp $ # not very useful with static libao NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} @@ -6,6 +6,7 @@ NOT_FOR_ARCHS= ${NO_SHARED_ARCHS} COMMENT= "free clone of mpg123, a command-line mp3 player" DISTNAME= mpg321-0.2.10 +PKGNAME= ${DISTNAME}p0 CATEGORIES= audio HOMEPAGE= http://mpg321.sourceforge.net/ diff --git a/audio/mpg321/patches/patch-mpg321_c b/audio/mpg321/patches/patch-mpg321_c index 6d4afc3f7d9..971ea69f3de 100644 --- a/audio/mpg321/patches/patch-mpg321_c +++ b/audio/mpg321/patches/patch-mpg321_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-mpg321_c,v 1.3 2004/01/06 22:20:55 naddy Exp $ ---- mpg321.c.orig 2002-03-24 06:49:20.000000000 +0100 -+++ mpg321.c 2004-01-06 23:16:02.000000000 +0100 +$OpenBSD: patch-mpg321_c,v 1.4 2005/09/10 16:42:01 naddy Exp $ +--- mpg321.c.orig Sun Mar 24 06:49:20 2002 ++++ mpg321.c Mon Aug 15 17:25:32 2005 @@ -188,7 +188,7 @@ static int show_id3(struct id3_tag const else @@ -60,14 +60,14 @@ $OpenBSD: patch-mpg321_c,v 1.3 2004/01/06 22:20:55 naddy Exp $ } else -@@ -536,10 +537,6 @@ int main(int argc, char *argv[]) +@@ -535,10 +536,6 @@ int main(int argc, char *argv[]) + ao_close(playdevice); ao_shutdown(); - +- -#if defined(RAW_SUPPORT) || defined(HTTP_SUPPORT) || defined(FTP_SUPPORT) - if(fd) close(fd); -#endif -- + return(0); } - diff --git a/audio/mpg321/patches/patch-network_c b/audio/mpg321/patches/patch-network_c new file mode 100644 index 00000000000..e0433cf9d5a --- /dev/null +++ b/audio/mpg321/patches/patch-network_c @@ -0,0 +1,13 @@ +$OpenBSD: patch-network_c,v 1.1 2005/09/10 16:42:01 naddy Exp $ +--- network.c.orig Sun Mar 24 06:49:56 2002 ++++ network.c Mon Aug 15 17:26:03 2005 +@@ -225,7 +225,8 @@ int http_open(char *arg) + * a html page and not the stream */ + snprintf(http_request, sizeof(http_request), "GET /%s HTTP/1.0\r\n" + /* "User-Agent: Mozilla/2.0 (Win95; I)\r\n" */ +- "Pragma: no-cache\r\n" "Host: %s\r\n" "Accept: */*\r\n" "\r\n", filename, host); ++ "User-Agent: mpg321/%s\r\n" ++ "Pragma: no-cache\r\n" "Host: %s\r\n" "Accept: */*\r\n" "\r\n", filename, VERSION, host); + + send(tcp_sock, http_request, strlen(http_request), 0); +