Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xbmc/network/Network.cpp b/xbmc/network/Network.cpp
- index c88a120..aeb2e59 100644
- --- a/xbmc/network/Network.cpp
- +++ b/xbmc/network/Network.cpp
- @@ -120,6 +120,19 @@ int CNetwork::ParseHex(char *str, unsigned char *addr)
- return len;
- }
- +CStdString CNetwork::GetHostName(void)
- +{
- + std::stringstream result;
- +
- + char hostName[128];
- + if (gethostname(hostName, sizeof(hostName)))
- + result << "unknown";
- + else
- + result << hostName;
- +
- + return result.str();
- +}
- +
- CNetworkInterface* CNetwork::GetFirstConnectedInterface()
- {
- vector<CNetworkInterface*>& ifaces = GetInterfaceList();
Add Comment
Please, Sign In to add comment