summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Fennema <fennema@google.com>2018-01-08 15:20:57 -0800
committerBen Fennema <fennema@google.com>2018-01-08 15:32:41 -0800
commit5a5f42245b16f08a1a4bc8c04c0853f17d5bea35 (patch)
tree580db01e2a7e1a8f323d09b538f123f1e836650f
parent63ae289dd0f8e176db72b5d9b6bcd13a085f7ddf (diff)
downloadcontexthub-5a5f42245b16f08a1a4bc8c04c0853f17d5bea35.tar.gz
nanohub: properly handling messaging for v1.2 chre nanoapps
Change version check to be >= 1.1 instead of == 1.1 Test: build Change-Id: If4506c8301419f6aaac66ed98d14143f1e12876a Signed-off-by: Ben Fennema <fennema@google.com>
-rw-r--r--firmware/os/core/nanohubCommand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/os/core/nanohubCommand.c b/firmware/os/core/nanohubCommand.c
index 67261188..1c31bb36 100644
--- a/firmware/os/core/nanohubCommand.c
+++ b/firmware/os/core/nanohubCommand.c
@@ -951,7 +951,7 @@ static uint32_t writeEvent(void *rx, uint8_t rx_len, void *tx, uint64_t timestam
if (rx_len >= sizeof(struct HostMsgHdrChre) &&
rx_len == sizeof(struct HostMsgHdrChre) + hostPacket->len &&
osTidById(&hostPacket->appId, &tid)) {
- if (osAppChreVersion(tid) == CHRE_API_VERSION_1_1) {
+ if (osAppChreVersion(tid) >= CHRE_API_VERSION_1_1) {
struct NanohubMsgChreHdr hdr = {
.size = hostPacket->len,
.endpoint = hostPacket->endpoint,
@@ -976,7 +976,7 @@ static uint32_t writeEvent(void *rx, uint8_t rx_len, void *tx, uint64_t timestam
} else if (rx_len >= sizeof(struct HostMsgHdrChreV10) &&
rx_len == sizeof(struct HostMsgHdrChreV10) + hostPacketV10->len &&
osTidById(&hostPacketV10->appId, &tid)) {
- if (osAppChreVersion(tid) == CHRE_API_VERSION_1_1) {
+ if (osAppChreVersion(tid) >= CHRE_API_VERSION_1_1) {
struct NanohubMsgChreHdr hdr = {
.size = hostPacketV10->len,
.endpoint = CHRE_HOST_ENDPOINT_UNSPECIFIED,