summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
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;