Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
4667d1d8
Commit
4667d1d8
authored
Mar 01, 2015
by
Mark Whitehorn
Browse files
add diagnostic message for UDP datagram overflow
parent
282d1258
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/comm/QGCXPlaneLink.cc
View file @
4667d1d8
...
...
@@ -553,8 +553,12 @@ void QGCXPlaneLink::readBytes()
quint16
senderPort
;
unsigned
int
s
=
socket
->
pendingDatagramSize
();
if
(
s
>
maxLength
)
std
::
cerr
<<
__FILE__
<<
__LINE__
<<
" UDP datagram overflow, allowed to read less bytes than datagram size
"
<<
std
::
endl
;
if
(
s
>
maxLength
)
std
::
cerr
<<
__FILE__
<<
__LINE__
<<
" UDP datagram overflow, allowed to read less bytes than datagram size
: "
<<
s
<<
std
::
endl
;
socket
->
readDatagram
(
data
,
maxLength
,
&
sender
,
&
senderPort
);
if
(
s
>
maxLength
)
{
std
::
string
headStr
=
std
::
string
(
data
,
data
+
5
);
std
::
cerr
<<
__FILE__
<<
__LINE__
<<
" UDP datagram header: "
<<
headStr
<<
std
::
endl
;
}
// Calculate the number of data segments a 36 bytes
// XPlane always has 5 bytes header: 'DATA@'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment