[xiph-commits] r15783 - icecast/trunk/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Mon Mar 16 18:45:42 PDT 2009
Author: karl
Date: 2009-03-16 18:45:41 -0700 (Mon, 16 Mar 2009)
New Revision: 15783
Modified:
icecast/trunk/icecast/src/cfgfile.c
icecast/trunk/icecast/src/slave.c
icecast/trunk/icecast/src/slave.h
Log:
add optional bind setting to relays
Modified: icecast/trunk/icecast/src/cfgfile.c
===================================================================
--- icecast/trunk/icecast/src/cfgfile.c 2009-03-16 22:59:28 UTC (rev 15782)
+++ icecast/trunk/icecast/src/cfgfile.c 2009-03-17 01:45:41 UTC (rev 15783)
@@ -775,6 +775,10 @@
relay->on_demand = atoi(tmp);
if (tmp) xmlFree(tmp);
}
+ else if (xmlStrcmp (node->name, XMLSTR("bind")) == 0) {
+ if (relay->bind) xmlFree (relay->bind);
+ relay->bind = (char *)xmlNodeListGetString (doc, node->xmlChildrenNode, 1);
+ }
} while ((node = node->next));
if (relay->localmount == NULL)
relay->localmount = (char *)xmlStrdup (XMLSTR(relay->mount));
Modified: icecast/trunk/icecast/src/slave.c
===================================================================
--- icecast/trunk/icecast/src/slave.c 2009-03-16 22:59:28 UTC (rev 15782)
+++ icecast/trunk/icecast/src/slave.c 2009-03-17 01:45:41 UTC (rev 15783)
@@ -190,7 +190,7 @@
INFO2 ("connecting to %s:%d", server, port);
- streamsock = sock_connect_wto (server, port, 10);
+ streamsock = sock_connect_wto_bind (server, port, relay->bind, 10);
if (streamsock == SOCK_ERROR)
{
WARN2 ("Failed to connect to %s:%d", server, port);
Modified: icecast/trunk/icecast/src/slave.h
===================================================================
--- icecast/trunk/icecast/src/slave.h 2009-03-16 22:59:28 UTC (rev 15782)
+++ icecast/trunk/icecast/src/slave.h 2009-03-17 01:45:41 UTC (rev 15783)
@@ -22,6 +22,7 @@
char *username;
char *password;
char *localmount;
+ char *bind;
struct source_tag *source;
int mp3metadata;
int on_demand;
More information about the commits
mailing list