[xiph-cvs] cvs commit: icecast/src connection.c slave.c

Michael Smith msmith at xiph.org
Fri Feb 7 03:56:41 PST 2003



msmith      03/02/07 06:56:40

  Modified:    src      connection.c slave.c
  Log:
  Add format detection workaround for icecast 1.x, which is buggy and doesn't
  send a content-type header.

Revision  Changes    Path
1.45      +3 -2      icecast/src/connection.c

Index: connection.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/connection.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- connection.c	6 Feb 2003 13:10:48 -0000	1.44
+++ connection.c	7 Feb 2003 11:56:40 -0000	1.45
@@ -320,8 +320,9 @@
                         source = source_create(client, con, parser, mount, format);
                 }
         } else {
-		WARN0("No content-type header, cannot handle source");
-        goto fail;
+		ERROR0("No content-type header, falling back to backwards compatiblity mode for icecast 1.x relays. Assuming content is mp3.");
+        format_type_t format = FORMAT_TYPE_MP3;
+        source = source_create(client, con, parser, mount, format);
         }
     client->respcode = 200;
     bytes = sock_write(client->con->sock, 

<p><p>1.15      +1 -1      icecast/src/slave.c

Index: slave.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/slave.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- slave.c	7 Feb 2003 11:46:03 -0000	1.14
+++ slave.c	7 Feb 2003 11:56:40 -0000	1.15
@@ -77,7 +77,7 @@
 
         streamsock = sock_connect_wto(server, port, 0);
         if (streamsock == SOCK_ERROR) {
-        WARN0("Failed to relay stream from master server");
+        WARN2("Failed to relay stream from master server, couldn't connect to http://%s:%d", server, port);
         return;
         }
         con = create_connection(streamsock, NULL);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list