summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Fennema <fennema@google.com>2018-11-08 14:47:24 -0800
committerBen Fennema <fennema@google.com>2018-11-08 18:50:40 -0800
commit7bf6a0cf68754a8d4f97f3adc54fb51e6cbdd290 (patch)
tree73e65eb0a37bb976ca2e6b5f86d4cadc37f112ac
parentbf044c805b81b34318a25bdc2507e1952a817bff (diff)
downloaddevice_google_contexthub-7bf6a0cf68754a8d4f97f3adc54fb51e6cbdd290.tar.gz
device_google_contexthub-7bf6a0cf68754a8d4f97f3adc54fb51e6cbdd290.tar.bz2
device_google_contexthub-7bf6a0cf68754a8d4f97f3adc54fb51e6cbdd290.zip
contexthubhal: fix result when hal doesn't send mgmt message to nanohubandroid-wear-8.0.0_r2
Return an error when the hal thinks the app being started is already running or when the app being unloaded/erased is either not running or doesn't exist. Bug: 118398281 Test: pass VtsHalContexthubV1_0 Change-Id: I9c5f884e11c86ba6a608c24614e41784d5d19308 Signed-off-by: Ben Fennema <fennema@google.com>
-rw-r--r--contexthubhal/system_comms.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contexthubhal/system_comms.cpp b/contexthubhal/system_comms.cpp
index 6edd0cbc..358e2f54 100644
--- a/contexthubhal/system_comms.cpp
+++ b/contexthubhal/system_comms.cpp
@@ -418,7 +418,7 @@ int SystemComm::AppMgmtSession::setup(const hub_message_t *appMsg, uint32_t tran
int SystemComm::AppMgmtSession::setupMgmt(const hub_message_t *appMsg, uint32_t transactionId, uint32_t cmd, AppManager &appManager)
{
- int32_t result = 0;
+ int32_t result = -1; // results are only directly returned on failure
const hub_app_name_t &appName = *static_cast<const hub_app_name_t*>(appMsg->message);
if (appMsg->message_len != sizeof(appName)) {
return -EINVAL;