mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-25 06:35:17 -04:00
Avoid UDP message number backwards compatibility issues, eventually
Remove the error message when an unrecognized message type arrives, debug configuration builds will print a debug message otherwise the message is silently ignored. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8593 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0aa3a45514
commit
ceceb9fd6a
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
#include "pimpl_impl.hpp"
|
#include "pimpl_impl.hpp"
|
||||||
|
|
||||||
@ -88,10 +89,14 @@ namespace NetworkMessage
|
|||||||
*parent >> type >> id_;
|
*parent >> type >> id_;
|
||||||
if (type >= maximum_message_type_)
|
if (type >= maximum_message_type_)
|
||||||
{
|
{
|
||||||
throw std::runtime_error {"Unrecognized message type"};
|
qDebug () << "Unrecognized message type:" << type << "from id:" << id_;
|
||||||
|
type_ = maximum_message_type_;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
type_ = static_cast<Type> (type);
|
type_ = static_cast<Type> (type);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
quint32 schema_;
|
quint32 schema_;
|
||||||
Type type_;
|
Type type_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user