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:
Bill Somerville 2018-03-31 11:44:38 +00:00
parent 0aa3a45514
commit ceceb9fd6a

View File

@ -4,6 +4,7 @@
#include <QString>
#include <QByteArray>
#include <QDebug>
#include "pimpl_impl.hpp"
@ -88,9 +89,13 @@ namespace NetworkMessage
*parent >> type >> id_;
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_;