diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-14 18:57:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-14 21:36:32 (GMT) |
commit | cb05f5a908e20006c954ce38755c2e422ecc2388 (patch) | |
tree | a793551a5fe279a57d4330119560e8542f745484 /Swiften/Network/PlatformDomainNameServiceQuery.cpp | |
parent | cad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff) | |
download | swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2 |
Removed Swift::String.
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.cpp')
-rw-r--r-- | Swiften/Network/PlatformDomainNameServiceQuery.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp index 838b3cf..d3b3561 100644 --- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp +++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp @@ -36,7 +36,7 @@ using namespace Swift; namespace Swift { -PlatformDomainNameServiceQuery::PlatformDomainNameServiceQuery(const String& service, EventLoop* eventLoop, PlatformDomainNameResolver* resolver) : PlatformDomainNameQuery(resolver), eventLoop(eventLoop), service(service) { +PlatformDomainNameServiceQuery::PlatformDomainNameServiceQuery(const std::string& service, EventLoop* eventLoop, PlatformDomainNameResolver* resolver) : PlatformDomainNameQuery(resolver), eventLoop(eventLoop), service(service) { } void PlatformDomainNameServiceQuery::run() { @@ -51,7 +51,7 @@ void PlatformDomainNameServiceQuery::runBlocking() { #if defined(SWIFTEN_PLATFORM_WINDOWS) DNS_RECORD* responses; // FIXME: This conversion doesn't work if unicode is deffed above - if (DnsQuery(service.getUTF8Data(), DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &responses, NULL) != ERROR_SUCCESS) { + if (DnsQuery(service.c_str(), DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &responses, NULL) != ERROR_SUCCESS) { emitError(); return; } @@ -68,7 +68,7 @@ void PlatformDomainNameServiceQuery::runBlocking() { // conversion to not work at all, but it does. // Actually, it doesn't. Fix this and remove explicit cast // Remove unicode undef above as well - record.hostname = String((const char*) currentEntry->Data.SRV.pNameTarget); + record.hostname = std::string((const char*) currentEntry->Data.SRV.pNameTarget); records.push_back(record); } currentEntry = currentEntry->pNext; @@ -81,7 +81,7 @@ void PlatformDomainNameServiceQuery::runBlocking() { ByteArray response; response.resize(NS_PACKETSZ); - int responseLength = res_query(const_cast<char*>(service.getUTF8Data()), ns_c_in, ns_t_srv, reinterpret_cast<u_char*>(response.getData()), response.getSize()); + int responseLength = res_query(const_cast<char*>(service.c_str()), ns_c_in, ns_t_srv, reinterpret_cast<u_char*>(response.getData()), response.getSize()); if (responseLength == -1) { SWIFT_LOG(debug) << "Error" << std::endl; emitError(); @@ -151,7 +151,7 @@ void PlatformDomainNameServiceQuery::runBlocking() { emitError(); return; } - record.hostname = String(entry.getData()); + record.hostname = std::string(entry.getData()); records.push_back(record); currentEntry += entryLength; answersCount--; |