diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-05-03 20:39:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-05-05 19:43:14 (GMT) |
commit | 772b2ec0243d7b55d91e4027d828881d18093ed0 (patch) | |
tree | 83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/Network/WindowsProxyProvider.cpp | |
parent | 0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff) | |
download | swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.zip swift-contrib-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2 |
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/Network/WindowsProxyProvider.cpp')
-rw-r--r-- | Swiften/Network/WindowsProxyProvider.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Network/WindowsProxyProvider.cpp b/Swiften/Network/WindowsProxyProvider.cpp index 5fb3c3a..3ae43e0 100644 --- a/Swiften/Network/WindowsProxyProvider.cpp +++ b/Swiften/Network/WindowsProxyProvider.cpp @@ -36,9 +36,9 @@ WindowsProxyProvider::WindowsProxyProvider() return; } dataBuffer.resize(dataSize); - result = RegQueryValueEx(hKey, "ProxyServer", NULL, &dataType, reinterpret_cast<BYTE*>(dataBuffer.getData()), &dataSize); + result = RegQueryValueEx(hKey, "ProxyServer", NULL, &dataType, reinterpret_cast<BYTE*>(vecptr(dataBuffer)), &dataSize); if(result == ERROR_SUCCESS) { - std::vector<std::string> proxies = String::split(dataBuffer.toString(), ';'); + std::vector<std::string> proxies = String::split(byteArrayToString(dataBuffer), ';'); std::pair<std::string, std::string> protocolAndProxy; foreach(std::string proxy, proxies) { if(proxy.find('=') != std::string::npos) { @@ -100,11 +100,11 @@ bool WindowsProxyProvider::proxyEnabled(HKEY hKey) const { return ret; dataBuffer.resize(dataSize); - result = RegQueryValueEx(hKey, "ProxyEnable", NULL, &dataType, reinterpret_cast<BYTE*>(dataBuffer.getData()), &dataSize); + result = RegQueryValueEx(hKey, "ProxyEnable", NULL, &dataType, reinterpret_cast<BYTE*>(vecptr(dataBuffer)), &dataSize); if(result != ERROR_SUCCESS) return ret; - for(size_t t = 0; t < dataBuffer.getSize(); t++) { + for(size_t t = 0; t < dataBuffer.size(); t++) { data += static_cast<int> (dataBuffer[t]) * pow(256, static_cast<double>(t)); } return (data == 1); |