summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-06-11 19:18:41 +0000
committerphintuka <phintuka>2007-06-11 19:18:41 +0000
commit315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81 (patch)
tree5bd666c9a67fdaffb7c9417b06a757cd1fcc899b /config.c
parent9f94640b9fe2e2f7c0cd056f10e4f8e633123603 (diff)
downloadxineliboutput-315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81.tar.gz
xineliboutput-315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81.tar.bz2
Command-line option for local interface address
Diffstat (limited to 'config.c')
-rw-r--r--config.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/config.c b/config.c
index 72c0f8d9..ee569415 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.38 2007-06-11 19:12:18 phintuka Exp $
+ * $Id: config.c,v 1.39 2007-06-11 19:18:41 phintuka Exp $
*
*/
@@ -445,8 +445,19 @@ bool config_t::ProcessArgs(int argc, char *argv[])
//case 'm': ProcessArg("Modeline", optarg);
// break;
case 'r': if(strcmp(optarg, "none")) {
- ProcessArg("Remote.ListenPort", optarg);
- ProcessArg("RemoteMode", listen_port>0 ? "1" : "0");
+ if(strchr(optarg, ':')) {
+ char *tmp = strdup(optarg);
+ char *pt = strchr(tmp,':');
+ *pt++ = 0;
+ ProcessArg("Remote.ListenPort", pt);
+ ProcessArg("RemoteMode", listen_port>0 ? "1" : "0");
+ ProcessArg("Remote.LocalIP", tmp);
+ free(tmp);
+ LOGMSG("Listening on address \'%s\' port %d", remote_local_ip, listen_port);
+ } else {
+ ProcessArg("Remote.ListenPort", optarg);
+ ProcessArg("RemoteMode", listen_port>0 ? "1" : "0");
+ }
} else
ProcessArg("RemoteMode", "0");
break;