Permalink
Browse files

added: advanced setting <jsonrpc><tcpport>9090</tcpport></jsonrpc> to…

… be able to configure the tcp port used for json rpc
  • Loading branch information...
1 parent 7621740 commit cf05a5d669579f61498e8ce1b4f53e44a2e27f74 @Montellese Montellese committed Feb 22, 2011
Showing with 5 additions and 2 deletions.
  1. +2 −2 xbmc/Application.cpp
  2. +2 −0 xbmc/settings/AdvancedSettings.cpp
  3. +1 −0 xbmc/settings/AdvancedSettings.h
@@ -1228,8 +1228,8 @@ void CApplication::StartJSONRPCServer()
#ifdef HAS_JSONRPC
if (g_guiSettings.GetBool("services.esenabled"))
{
- if (CTCPServer::StartServer(9090, g_guiSettings.GetBool("services.esallinterfaces")))
- CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", 9090);
+ if (CTCPServer::StartServer(g_advancedSettings.m_jsonTcpPort, g_guiSettings.GetBool("services.esallinterfaces")))
+ CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", g_advancedSettings.m_jsonTcpPort);
}
#endif
}
@@ -276,6 +276,7 @@ void CAdvancedSettings::Initialize()
m_cacheMemBufferSize = (1048576 * 5);
m_jsonOutputCompact = true;
+ m_jsonTcpPort = 9090;
}
bool CAdvancedSettings::Load()
@@ -590,6 +591,7 @@ bool CAdvancedSettings::Load()
if (pElement)
{
XMLUtils::GetBoolean(pElement, "compactoutput", m_jsonOutputCompact);
+ XMLUtils::GetUInt(pElement, "tcpport", m_jsonTcpPort);
}
pElement = pRootElement->FirstChildElement("samba");
@@ -289,6 +289,7 @@ class CAdvancedSettings : public virtual xbmcutil::Referenced
unsigned int m_cacheMemBufferSize;
bool m_jsonOutputCompact;
+ unsigned int m_jsonTcpPort;
};
XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings);

0 comments on commit cf05a5d

Please sign in to comment.