Skip to content
This repository
Browse code

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

… be able to configure the tcp port used for json rpc
  • Loading branch information...
commit cf05a5d669579f61498e8ce1b4f53e44a2e27f74 1 parent 7621740
Sascha Montellese Montellese authored
4 xbmc/Application.cpp
@@ -1228,8 +1228,8 @@ void CApplication::StartJSONRPCServer()
1228 1228 #ifdef HAS_JSONRPC
1229 1229 if (g_guiSettings.GetBool("services.esenabled"))
1230 1230 {
1231   - if (CTCPServer::StartServer(9090, g_guiSettings.GetBool("services.esallinterfaces")))
1232   - CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", 9090);
  1231 + if (CTCPServer::StartServer(g_advancedSettings.m_jsonTcpPort, g_guiSettings.GetBool("services.esallinterfaces")))
  1232 + CZeroconf::GetInstance()->PublishService("servers.jsonrpc", "_xbmc-jsonrpc._tcp", "XBMC JSONRPC", g_advancedSettings.m_jsonTcpPort);
1233 1233 }
1234 1234 #endif
1235 1235 }
2  xbmc/settings/AdvancedSettings.cpp
@@ -276,6 +276,7 @@ void CAdvancedSettings::Initialize()
276 276 m_cacheMemBufferSize = (1048576 * 5);
277 277
278 278 m_jsonOutputCompact = true;
  279 + m_jsonTcpPort = 9090;
279 280 }
280 281
281 282 bool CAdvancedSettings::Load()
@@ -590,6 +591,7 @@ bool CAdvancedSettings::Load()
590 591 if (pElement)
591 592 {
592 593 XMLUtils::GetBoolean(pElement, "compactoutput", m_jsonOutputCompact);
  594 + XMLUtils::GetUInt(pElement, "tcpport", m_jsonTcpPort);
593 595 }
594 596
595 597 pElement = pRootElement->FirstChildElement("samba");
1  xbmc/settings/AdvancedSettings.h
@@ -289,6 +289,7 @@ class CAdvancedSettings : public virtual xbmcutil::Referenced
289 289 unsigned int m_cacheMemBufferSize;
290 290
291 291 bool m_jsonOutputCompact;
  292 + unsigned int m_jsonTcpPort;
292 293 };
293 294
294 295 XBMC_GLOBAL(CAdvancedSettings,g_advancedSettings);

0 comments on commit cf05a5d

Please sign in to comment.
Something went wrong with that request. Please try again.