Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robotlab
firefly
Commits
e6fcb59f
Commit
e6fcb59f
authored
May 05, 2014
by
Erik Jansson
Browse files
Fix bug whit undefined wrapping of sequence numbers.
parent
49871223
Changes
1
Show whitespace changes
Inline
Side-by-side
src/protocol/firefly_protocol_channel.c
View file @
e6fcb59f
#include
"protocol/firefly_protocol_private.h"
#include
<limits.h>
#include
<utils/firefly_errors.h>
#include
"utils/firefly_event_queue_private.h"
...
...
@@ -98,10 +100,10 @@ struct firefly_connection *firefly_channel_get_connection(
int
firefly_channel_next_seqno
(
struct
firefly_channel
*
chan
)
{
if
(
++
chan
->
current_seqno
<
=
0
)
{
chan
->
current_seqno
=
1
;
if
(
chan
->
current_seqno
=
=
INT_MAX
)
{
chan
->
current_seqno
=
0
;
}
return
chan
->
current_seqno
;
return
++
chan
->
current_seqno
;
}
int
firefly_channel_closed_event
(
void
*
event_arg
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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