summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-13 20:27:50 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-13 20:58:23 (GMT)
commit27878a6a612af77fdc6f27dacc0201a8da92a1fb (patch)
tree20f1590258f2e6694e89b140a7ed603da33a1b16 /Swiften/Network/PlatformDomainNameServiceQuery.cpp
parent0863ece69f6490602e90b22c0dd17189bd8bf5a7 (diff)
downloadswift-27878a6a612af77fdc6f27dacc0201a8da92a1fb.zip
swift-27878a6a612af77fdc6f27dacc0201a8da92a1fb.tar.bz2
Added debug output to connector.
Diffstat (limited to 'Swiften/Network/PlatformDomainNameServiceQuery.cpp')
-rw-r--r--Swiften/Network/PlatformDomainNameServiceQuery.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swiften/Network/PlatformDomainNameServiceQuery.cpp b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
index ed73b64..7ab6e7a 100644
--- a/Swiften/Network/PlatformDomainNameServiceQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameServiceQuery.cpp
@@ -27,6 +27,7 @@
#include "Swiften/Base/ByteArray.h"
#include "Swiften/EventLoop/EventLoop.h"
#include "Swiften/Base/foreach.h"
+#include <Swiften/Base/Log.h>
using namespace Swift;
@@ -51,6 +52,8 @@ void PlatformDomainNameServiceQuery::run() {
}
void PlatformDomainNameServiceQuery::doRun() {
+ SWIFT_LOG(debug) << "Querying " << service << std::endl;
+
std::vector<DomainNameServiceQuery::Result> records;
#if defined(SWIFTEN_PLATFORM_WINDOWS)
@@ -84,11 +87,11 @@ void PlatformDomainNameServiceQuery::doRun() {
// Make sure we reinitialize the domain list every time
res_init();
- //std::cout << "SRV: Querying " << service << std::endl;
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());
if (responseLength == -1) {
+ SWIFT_LOG(debug) << "Error" << std::endl;
emitError();
return;
}