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
This commit is contained in:
Edson W. R. Pereira 2013-09-04 17:14:18 +00:00
parent 72f90c7d25
commit caf67fb701
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
//-------------------------------------------------------------- MainWindow
//---------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"

View File

@ -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);
}
}