Skip to content

Commit

Permalink
Msg array offset for sequence number
Browse files Browse the repository at this point in the history
Fixed bug where I was using the wrong offsets into the msg to find the epoch and sequence number.
  • Loading branch information
ejohnstown committed Jun 10, 2013
1 parent 47e9fe3 commit 4974e1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions udp_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ static int GetRecordSeq(const char* msg)
{
/* Only want to drop on Epoch 0. Only use the least
* significant 32-bits of the sequence number. */
if (msg[5] == 0 && msg[6] == 0)
return (int)( msg[9] << 24 |
msg[10] << 16 |
msg[11] << 8 |
msg[12]);
if (msg[3] == 0 && msg[4] == 0)
return (int)( msg[7] << 24 |
msg[8] << 16 |
msg[9] << 8 |
msg[10]);

return 0;
}
Expand Down

0 comments on commit 4974e1d

Please sign in to comment.