Ticket #2031: myth-interface.patch
File myth-interface.patch, 4.3 KB (added by , 19 years ago) |
---|
-
programs/mythbackend/httpstatus.
old new 11 11 #include "libmyth/mythcontext.h" 12 12 #include "jobqueue.h" 13 13 14 14 15 HttpStatus::HttpStatus(MainServer *parent, int port)16 : QServerSocket( port, 1)15 HttpStatus::HttpStatus(MainServer *parent, const QString &sip, int port) 16 : QServerSocket(sip, port, 1) 17 17 { 18 18 m_parent = parent; 19 19 } 20 20 -
programs/mythbackend/httpstatus.
old new 11 11 class HttpStatus : public QServerSocket 12 12 { 13 13 Q_OBJECT 14 14 public: 15 HttpStatus(MainServer *parent, int port);15 HttpStatus(MainServer *parent, const QString &sip, int port); 16 16 17 17 void newConnection(int socket); 18 18 19 19 private slots: -
programs/mythbackend/main.
old new 546 546 return BACKEND_EXIT_OPENING_VLOCKFILE_ERROR; 547 547 } 548 548 } 549 549 550 new MainServer(ismaster, port, statusport, &tvList, sched, expirer);550 new MainServer(ismaster, myip, port, statusport, &tvList, sched, expirer); 551 551 552 552 if (ismaster) 553 553 { 554 554 QString WOLslaveBackends -
programs/mythbackend/mainserver.
old new 106 106 QWaitCondition waitCond; 107 107 bool threadlives; 108 108 }; 109 109 110 MainServer::MainServer(bool master, int port, int statusport,110 MainServer::MainServer(bool master, const QString &sip, int port, int statusport, 111 111 QMap<int, EncoderLink *> *tvList, 112 112 Scheduler *sched, AutoExpire *expirer) 113 113 { 114 114 m_sched = sched; … … 130 130 recordfileprefix = gContext->GetFilePrefix(); 131 131 132 132 masterBackendOverride = gContext->GetSetting("MasterBackendOverride", 0); 133 133 134 mythserver = new MythServer( port);134 mythserver = new MythServer(sip,port); 135 135 if (!mythserver->ok()) 136 136 { 137 VERBOSE(VB_IMPORTANT, QString("Failed to bind port %1. Exiting.") 138 .arg(port)); 137 VERBOSE(VB_IMPORTANT, QString("Failed to bind to %1:%2. Exiting.") 138 .arg(sip) 139 .arg(port)); 139 140 exit(BACKEND_BUGGY_EXIT_NO_BIND_MAIN); 140 141 } 141 142 142 143 connect(mythserver, SIGNAL(newConnect(RefSocket *)), 143 144 SLOT(newConnection(RefSocket *))); 144 145 connect(mythserver, SIGNAL(endConnect(RefSocket *)), 145 146 SLOT(endConnection(RefSocket *))); 146 147 147 statusserver = new HttpStatus(this, s tatusport);148 statusserver = new HttpStatus(this, sip, statusport); 148 149 if (!statusserver->ok()) 149 150 { 150 VERBOSE(VB_IMPORTANT, QString("Failed to bind to port %1. Exiting.") 151 VERBOSE(VB_IMPORTANT, QString("Failed to bind to %1:%2. Exiting.") 152 .arg(sip) 151 153 .arg(statusport)); 152 154 exit(BACKEND_BUGGY_EXIT_NO_BIND_STATUS); 153 155 } 154 156 -
programs/mythbackend/mainserver.
old new 25 25 class MainServer : public QObject 26 26 { 27 27 Q_OBJECT 28 28 public: 29 MainServer(bool master, int port, int statusport,29 MainServer(bool master, const QString &sip, int port, int statusport, 30 30 QMap<int, EncoderLink *> *tvList, 31 31 Scheduler *sched, AutoExpire *expirer); 32 32 33 33 ~MainServer(); -
programs/mythbackend/server.
old new 3 3 using namespace std; 4 4 5 5 #include "server.h" 6 6 7 MythServer::MythServer( int port, QObject *parent)8 : QServerSocket( port, 1, parent)7 MythServer::MythServer(const QString &sip, int port, QObject *parent) 8 : QServerSocket(sip, port, 1, parent) 9 9 { 10 10 } 11 11 12 12 void MythServer::newConnection(int socket) -
programs/mythbackend/server.
old new 33 33 class MythServer : public QServerSocket 34 34 { 35 35 Q_OBJECT 36 36 public: 37 MythServer( int port, QObject *parent = 0);37 MythServer(const QString &sip, int port, QObject *parent = 0); 38 38 39 39 void newConnection(int socket); 40 40 41 41 signals: