summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-08-22 09:44:35 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-08-22 09:44:35 (GMT)
commit4814521a30b1edbd34a782cd804a501225294fd8 (patch)
treeb0b8df3ea1b5e5aaf8c964c8c817a8982cce644b /Swiften/Network
parentfe4dbe0430524152d198401eb18934abd4bae082 (diff)
downloadswift-contrib-4814521a30b1edbd34a782cd804a501225294fd8.zip
swift-contrib-4814521a30b1edbd34a782cd804a501225294fd8.tar.bz2
Fix expanded tab characters.
Diffstat (limited to 'Swiften/Network')
-rw-r--r--Swiften/Network/DomainNameResolver.cpp32
-rw-r--r--Swiften/Network/HostAddress.cpp8
-rw-r--r--Swiften/Network/HostAddress.h2
3 files changed, 21 insertions, 21 deletions
diff --git a/Swiften/Network/DomainNameResolver.cpp b/Swiften/Network/DomainNameResolver.cpp
index d2bbf0d..44b3ecf 100644
--- a/Swiften/Network/DomainNameResolver.cpp
+++ b/Swiften/Network/DomainNameResolver.cpp
@@ -30,15 +30,15 @@ DomainNameResolver::~DomainNameResolver() {
}
HostAddressPort DomainNameResolver::resolve(const String& domain) {
- char* output;
- if (idna_to_ascii_8z(domain.getUTF8Data(), &output, 0) == IDNA_SUCCESS) {
- std::string outputString(output);
- free(output);
- return resolveDomain(outputString);
- }
- else {
- return resolveDomain(domain.getUTF8String());
- }
+ char* output;
+ if (idna_to_ascii_8z(domain.getUTF8Data(), &output, 0) == IDNA_SUCCESS) {
+ std::string outputString(output);
+ free(output);
+ return resolveDomain(outputString);
+ }
+ else {
+ return resolveDomain(domain.getUTF8String());
+ }
}
HostAddressPort DomainNameResolver::resolveDomain(const std::string& domain) {
@@ -51,14 +51,14 @@ HostAddressPort DomainNameResolver::resolveDomain(const std::string& domain) {
}
HostAddressPort DomainNameResolver::resolveXMPPService(const std::string& domain) {
- std::string srvQuery = "_xmpp-client._tcp." + domain;
+ std::string srvQuery = "_xmpp-client._tcp." + domain;
#if defined(SWIFTEN_PLATFORM_WINDOWS)
DNS_RECORD* responses;
// FIXME: This conversion doesn't work if unicode is deffed above
- if (DnsQuery(srvQuery.c_str(), DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &responses, NULL) != ERROR_SUCCESS) {
+ if (DnsQuery(srvQuery.c_str(), DNS_TYPE_SRV, DNS_QUERY_STANDARD, NULL, &responses, NULL) != ERROR_SUCCESS) {
throw DomainNameResolveException();
- }
+ }
DNS_RECORD* currentEntry = responses;
while (currentEntry) {
@@ -83,10 +83,10 @@ HostAddressPort DomainNameResolver::resolveXMPPService(const std::string& domain
#else
- ByteArray response;
- response.resize(NS_PACKETSZ);
- int responseLength = res_query(const_cast<char*>(srvQuery.c_str()), ns_c_in, ns_t_srv, reinterpret_cast<u_char*>(response.getData()), response.getSize());
- if (responseLength == -1) {
+ ByteArray response;
+ response.resize(NS_PACKETSZ);
+ int responseLength = res_query(const_cast<char*>(srvQuery.c_str()), ns_c_in, ns_t_srv, reinterpret_cast<u_char*>(response.getData()), response.getSize());
+ if (responseLength == -1) {
throw DomainNameResolveException();
}
diff --git a/Swiften/Network/HostAddress.cpp b/Swiften/Network/HostAddress.cpp
index ea324cb..8ac66bb 100644
--- a/Swiften/Network/HostAddress.cpp
+++ b/Swiften/Network/HostAddress.cpp
@@ -12,9 +12,9 @@
namespace Swift {
HostAddress::HostAddress() {
- for (int i = 0; i < 4; ++i) {
- address_.push_back(0);
- }
+ for (int i = 0; i < 4; ++i) {
+ address_.push_back(0);
+ }
}
HostAddress::HostAddress(const String& address) {
@@ -54,7 +54,7 @@ std::string HostAddress::toString() const {
}
else {
assert(false);
- return "";
+ return "";
}
}
diff --git a/Swiften/Network/HostAddress.h b/Swiften/Network/HostAddress.h
index fa34df4..bf6d2f8 100644
--- a/Swiften/Network/HostAddress.h
+++ b/Swiften/Network/HostAddress.h
@@ -8,7 +8,7 @@ namespace Swift {
class HostAddress {
public:
- HostAddress();
+ HostAddress();
HostAddress(const String&);
HostAddress(const unsigned char* address, int length);