diff -Nru xine-0.7.6+network~old/xine.c xine-0.7.6+network/xine.c --- xine-0.7.6+network~old/xine.c 2005-09-25 18:19:35.000000000 +0200 +++ xine-0.7.6+network/xine.c 2005-11-12 23:37:19.000000000 +0100 @@ -33,7 +33,7 @@ public: PluginXine::cXineLib *m_xineLib; - int m_instanceNo; + in_addr_t m_bindIp; cPluginXine(void); virtual ~cPluginXine(); @@ -56,7 +56,7 @@ , m_remote(0) , m_remoteOn(false) , m_xineLib(0) - , m_instanceNo(-1) + , m_bindIp(0) { // Initialize any member variables here. // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL @@ -73,7 +73,7 @@ //Return a string that describes all known command line options. //" - -- x \n" return - " -i N instance number to append to FIFO directory\n" + " -i ip ip address to bind to\n" " -q turn off debug messages on console\n" " -r turn on remote (pressing keys in xine controls VDR)\n" " -s switch to curses skin, while xine is disconnected\n" @@ -91,11 +91,9 @@ { case 'i': { - const int no = ::atoi(::optarg); - if (no < 0) + m_bindIp = inet_addr(::optarg); + if (m_bindIp == INADDR_NONE) return false; - - m_instanceNo = no; } break; @@ -181,9 +179,9 @@ namespace PluginXine { - int GetInstanceNo(cPlugin *const plugin) + int GetBindIp(cPlugin *const plugin) { - return ((cPluginXine *)plugin)->m_instanceNo; + return ((cPluginXine *)plugin)->m_bindIp; } cXineLib *&GetXineLib(cPlugin *const plugin) diff -Nru xine-0.7.6+network~old/xineLib.c xine-0.7.6+network/xineLib.c --- xine-0.7.6+network~old/xineLib.c 2005-09-25 18:19:35.000000000 +0200 +++ xine-0.7.6+network/xineLib.c 2005-11-12 23:36:02.000000000 +0100 @@ -1847,7 +1847,7 @@ #endif - extern int GetInstanceNo(cPlugin *const plugin); + extern int GetBindIp(cPlugin *const plugin); extern cXineLib *&GetXineLib(cPlugin *const plugin); cXineLib::cXineLib(cPlugin *const plugin, const cXineSettings &settings, cMutex &osdMutex, cXineRemote *const remote) @@ -1877,14 +1877,9 @@ { m_fifoDir = FIFO_DIR; - if (GetInstanceNo(plugin) >= 0) - { - char s[ 20 ]; - ::sprintf(s, "%d", GetInstanceNo(plugin)); - - m_fifoDir += s; - } - + m_bindIp = GetBindIp(plugin); + m_fifoDir += itoa(m_bindIp); + m_fifoNameControl = m_fifoDir + "/stream.control"; m_fifoNameResult = m_fifoDir + "/stream.result"; m_fifoNameRemote = m_fifoDir + "/stream.event"; @@ -1956,7 +1951,7 @@ return -1; } - sain.sin_addr.s_addr = 0; + sain.sin_addr.s_addr = m_bindIp; sain.sin_port = htons(port); ::setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&onoff, sizeof(int) ); diff -Nru xine-0.7.6+network~old/xineLib.h xine-0.7.6+network/xineLib.h --- xine-0.7.6+network~old/xineLib.h 2005-09-25 18:19:35.000000000 +0200 +++ xine-0.7.6+network/xineLib.h 2005-11-12 23:35:25.000000000 +0100 @@ -88,6 +88,7 @@ string m_fifoNameStream; string m_fifoNameExtControl; string m_fifoNameExtResult; + in_addr_t m_bindIp; private: cPlugin *const m_plugin;