[xiph-cvs] cvs commit: libshout/src shout.c

Brendan brendan at xiph.org
Tue Mar 4 10:55:08 PST 2003



brendan     03/03/04 13:55:08

  Modified:    src      shout.c
  Log:
  Shoutcast compatibility fixes

Revision  Changes    Path
1.29      +7 -10     libshout/src/shout.c

Index: shout.c
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/shout.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- shout.c	25 Feb 2003 23:14:39 -0000	1.28
+++ shout.c	4 Mar 2003 18:55:08 -0000	1.29
@@ -88,7 +88,10 @@
                 return self->error = SHOUTERR_UNSUPPORTED;
 
         if(self->protocol != SHOUT_PROTOCOL_HTTP) {
-		self->socket = sock_connect(self->host, self->port);
+		if (self->protocol == SHOUT_PROTOCOL_ICY)
+			self->socket = sock_connect(self->host, self->port+1);
+		else
+			self->socket = sock_connect(self->host, self->port);
                 if (self->socket <= 0)
                         return self->error = SHOUTERR_NOCONNECT;
         }
@@ -903,18 +906,12 @@
         if (!sock_write(self->socket, "icy-url:%s\n", self->url != NULL ? self->url : "http://www.icecast.org/"))
                 return SHOUTERR_SOCKET;
 
-#if 0
         /* Fields we don't use */
-	if (!sock_write(self->socket, "icy-irc:%s\n", self->irc != NULL ? self->irc : ""))
-		return SHOUTERR_SOCKET;
-	if (!sock_write(self->socket, "icy-aim:%s\n", self->aim != NULL ? self->aim : ""))
-		return SHOUTERR_SOCKET;
-	if (!sock_write(self->socket, "icy-icq:%s\n", self->icq != NULL ? self->icq : ""))
+	if (!sock_write(self->socket, "icy-irc:\nicy-aim:\nicy-icq:\n"))
                 return SHOUTERR_SOCKET;
-	if (!sock_write(self->socket, "icy-pub:%i\n", self->ispublic))
-		return SHOUTERR_SOCKET;
-#endif
 
+	if (!sock_write(self->socket, "icy-pub:%i\n", self->public))
+		return SHOUTERR_SOCKET;
         if (!sock_write(self->socket, "icy-genre:%s\n", self->genre != NULL ? self->genre : "icecast"))
                 return SHOUTERR_SOCKET;
         if (!sock_write(self->socket, "icy-br:%s\n", bitrate))

<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