diff options
author | phintuka <phintuka> | 2007-06-11 19:18:41 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2007-06-11 19:18:41 +0000 |
commit | 315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81 (patch) | |
tree | 5bd666c9a67fdaffb7c9417b06a757cd1fcc899b | |
parent | 9f94640b9fe2e2f7c0cd056f10e4f8e633123603 (diff) | |
download | xineliboutput-315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81.tar.gz xineliboutput-315ca14cc3b33fa0210fea8c41bc6cd5f76ceb81.tar.bz2 |
Command-line option for local interface address
-rw-r--r-- | config.c | 17 | ||||
-rw-r--r-- | xineliboutput.c | 4 |
2 files changed, 17 insertions, 4 deletions
@@ -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; diff --git a/xineliboutput.c b/xineliboutput.c index c6a2f384..81885e47 100644 --- a/xineliboutput.c +++ b/xineliboutput.c @@ -21,7 +21,7 @@ * * xineliboutput.c: VDR Plugin interface * - * $Id: xineliboutput.c,v 1.20 2007-05-17 12:58:33 phintuka Exp $ + * $Id: xineliboutput.c,v 1.21 2007-06-11 19:18:41 phintuka Exp $ * */ @@ -95,6 +95,8 @@ const char cmdLineHelp[] = " -r PORT --remote=PORT Listen PORT for remote clients\n" " (default "LISTEN_PORT_S")\n" " none or 0 disables remote mode\n" +" Also local interface address can be specified:\n" +" --remote=<ip>:<port> (default is all interfaces)\n" " -A NAME --audio=NAME Use audio driver NAME for local frontend\n" " Supported values:\n" " auto, alsa, oss, arts, esound, none\n" |