Navigation Menu

Skip to content

Commit

Permalink
added: advanced setting <jsonrpc><tcpport>9090</tcpport></jsonrpc> to…
Browse files Browse the repository at this point in the history
… be able to configure the tcp port used for json rpc
  • Loading branch information
Montellese committed Feb 22, 2011
1 parent 7621740 commit cf05a5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/Application.cpp
Expand Up @@ -1228,8 +1228,8 @@ void CApplication::StartJSONRPCServer()
#ifdef HAS_JSONRPC #ifdef HAS_JSONRPC
if (g_guiSettings.GetBool("services.esenabled")) if (g_guiSettings.GetBool("services.esenabled"))
{ {
if (CTCPServer::StartServer(9090, g_guiSettings.GetBool("services.esallinterfaces"))) if (CTCPServer::StartServer(g_advancedSettings.m_jsonTcpPort, g_guiSettings.GetBool("services.esallinterfaces")))
CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", 9090); CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", g_advancedSettings.m_jsonTcpPort);
} }
#endif #endif
} }
Expand Down
2 changes: 2 additions & 0 deletions xbmc/settings/AdvancedSettings.cpp
Expand Up @@ -276,6 +276,7 @@ void CAdvancedSettings::Initialize()
m_cacheMemBufferSize = (1048576 * 5); m_cacheMemBufferSize = (1048576 * 5);


m_jsonOutputCompact = true; m_jsonOutputCompact = true;
m_jsonTcpPort = 9090;
} }


bool CAdvancedSettings::Load() bool CAdvancedSettings::Load()
Expand Down Expand Up @@ -590,6 +591,7 @@ bool CAdvancedSettings::Load()
if (pElement) if (pElement)
{ {
XMLUtils::GetBoolean(pElement, "compactoutput", m_jsonOutputCompact); XMLUtils::GetBoolean(pElement, "compactoutput", m_jsonOutputCompact);
XMLUtils::GetUInt(pElement, "tcpport", m_jsonTcpPort);
} }


pElement = pRootElement->FirstChildElement("samba"); pElement = pRootElement->FirstChildElement("samba");
Expand Down
1 change: 1 addition & 0 deletions xbmc/settings/AdvancedSettings.h
Expand Up @@ -289,6 +289,7 @@ class CAdvancedSettings : public virtual xbmcutil::Referenced
unsigned int m_cacheMemBufferSize; unsigned int m_cacheMemBufferSize;


bool m_jsonOutputCompact; bool m_jsonOutputCompact;
unsigned int m_jsonTcpPort;
}; };


XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings); XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings);

0 comments on commit cf05a5d

Please sign in to comment.