Skip to content

Commit

Permalink
Merge pull request #8843 from Tolriq/http_default_port
Browse files Browse the repository at this point in the history
Fix Http server default port on all platforms
  • Loading branch information
wsnipex committed Jan 14, 2016
2 parents 08af733 + 73d2771 commit 41c85a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 3 additions & 0 deletions system/settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,9 @@
<step>1</step>
<maximum>65535</maximum>
</constraints>
<updates>
<update type="change" />
</updates>
<control type="edit" format="integer" />
</setting>
<setting id="services.webserverusername" type="string" parent="services.webserver" label="1048" help="36330">
Expand Down
7 changes: 7 additions & 0 deletions xbmc/network/NetworkServices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@ bool CNetworkServices::OnSettingUpdate(CSetting* &setting, const char *oldSettin
!CSettings::GetInstance().GetString(CSettings::SETTING_SERVICES_WEBSERVERPASSWORD).empty())
return true;
}
if (settingId == CSettings::SETTING_SERVICES_WEBSERVERPORT)
{
// if webserverport is default but webserver is activated then treat it as altered
// and don't change the port to new value
if (CSettings::GetInstance().GetBool(CSettings::SETTING_SERVICES_WEBSERVER))
return true;
}
return false;
}

Expand Down
5 changes: 0 additions & 5 deletions xbmc/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -906,11 +906,6 @@ void CSettings::InitializeDefaults()

if (g_application.IsStandAlone())
((CSettingInt*)m_settingsManager->GetSetting(CSettings::SETTING_POWERMANAGEMENT_SHUTDOWNSTATE))->SetDefault(POWERSTATE_SHUTDOWN);

#if defined(HAS_WEB_SERVER)
if (CUtil::CanBindPrivileged())
((CSettingInt*)m_settingsManager->GetSetting(CSettings::SETTING_SERVICES_WEBSERVERPORT))->SetDefault(80);
#endif
}

void CSettings::InitializeOptionFillers()
Expand Down

0 comments on commit 41c85a1

Please sign in to comment.