aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremy Friesen <jeremy.friesen@thisisant.com>2013-05-01 09:10:37 -0600
committerJeremy Friesen <jeremy.friesen@thisisant.com>2013-05-01 09:10:37 -0600
commite6e7a81b688c0a26c049e664fd1a856cb76b6781 (patch)
tree45a31884eeb787834107414f21529b134966efa2 /src
parent4b5bfd9046bfa0796cf2dac6c1063cb3fa2540cf (diff)
downloadandroid_external_ant-wireless_ant_native-e6e7a81b688c0a26c049e664fd1a856cb76b6781.tar.gz
android_external_ant-wireless_ant_native-e6e7a81b688c0a26c049e664fd1a856cb76b6781.tar.bz2
android_external_ant-wireless_ant_native-e6e7a81b688c0a26c049e664fd1a856cb76b6781.zip
Fixed bug where iRxBufferLength was not getting cleared
Diffstat (limited to 'src')
-rw-r--r--src/vfs/ant_rx_chardev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vfs/ant_rx_chardev.c b/src/vfs/ant_rx_chardev.c
index 778f0c9..f15e97a 100644
--- a/src/vfs/ant_rx_chardev.c
+++ b/src/vfs/ant_rx_chardev.c
@@ -272,6 +272,8 @@ int readChannelMsg(ant_channel_type eChannel, ant_channel_info_t *pstChnlInfo)
iRet = 0;
goto out;
}
+
+ iRxBufferLength = 0; // reset buffer length here since we should have a full packet
#if ANT_HCI_OPCODE_SIZE == 1 // Check the different message types by opcode
ANT_U8 opcode = aucRxBuffer[ANT_HCI_OPCODE_OFFSET];
@@ -329,7 +331,7 @@ int readChannelMsg(ant_channel_type eChannel, ant_channel_info_t *pstChnlInfo)
&aucRxBuffer[iCurrentHciPacketOffset + ANT_HCI_DATA_OFFSET]);
} else {
ANT_WARN("%s rx callback is null", pstChnlInfo->pcDevicePath);
- }
+ }
}
iCurrentHciPacketOffset = iCurrentHciPacketOffset + ANT_HCI_HEADER_SIZE + ANT_HCI_FOOTER_SIZE + iHciDataSize;