From caf67fb7013f9f40c15e2f061e0f8c8c80956c98 Mon Sep 17 00:00:00 2001 From: "Edson W. R. Pereira" Date: Wed, 4 Sep 2013 17:14:18 +0000 Subject: [PATCH] Added code to hangle DNS loopkup failures in PSK Reporter. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3566 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 2 +- psk_reporter.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e4b4d2f4e..4c5a21e17 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,4 +1,4 @@ -//-------------------------------------------------------------- MainWindow +//---------------------------------------------------------------- MainWindow #include "mainwindow.h" #include "ui_mainwindow.h" diff --git a/psk_reporter.cpp b/psk_reporter.cpp index c991de57b..540d6a058 100644 --- a/psk_reporter.cpp +++ b/psk_reporter.cpp @@ -106,7 +106,9 @@ void PSK_Reporter::sendReport() // Get IP address for pskreporter.info and send report via UDP QHostInfo info = QHostInfo::fromName("report.pskreporter.info"); - m_udpSocket->writeDatagram(report,info.addresses().at(0),4739); + if (!info.addresses().isEmpty()) { + m_udpSocket->writeDatagram(report,info.addresses().at(0),4739); + } }