Try/catch the DNS decoding
This commit is contained in:
parent
ac8b772060
commit
5d337b2d29
1 changed files with 59 additions and 51 deletions
|
@ -136,6 +136,9 @@ void IppDiscovery::readPendingDatagrams()
|
|||
sender = QHostAddress(sender.toIPv4Address());
|
||||
|
||||
quint16 transactionid, flags, questions, answerRRs, authRRs, addRRs;
|
||||
|
||||
try {
|
||||
|
||||
resp >> transactionid >> flags >> questions >> answerRRs >> authRRs >> addRRs;
|
||||
|
||||
for(quint16 i = 0; i < questions; i++)
|
||||
|
@ -198,7 +201,12 @@ void IppDiscovery::readPendingDatagrams()
|
|||
Q_ASSERT(resp.pos() == pos_before+len);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch(std::exception e)
|
||||
{
|
||||
qDebug() << e.what();
|
||||
return;
|
||||
}
|
||||
qDebug() << "new ipp ptrs" << ipp_ptrs;
|
||||
qDebug() << "ipp ptrs" << _ipp;
|
||||
qDebug() << "rps" << _rps;
|
||||
|
|
Loading…
Reference in a new issue