host/mesh: Return ETIMEDOUT if k_sem_take call times out
EAGAIN is used in some other places in the code, e.g. if node is not
provisioned when a model tries to send a message. This change helps to
differentiated if the acknowledged message timed out from other failers.
This is port of
@@ -65,6 +65,10 @@ int bt_mesh_msg_ack_ctx_wait(struct bt_mesh_msg_ack_ctx *ack, int32_t timeout)
err = k_sem_take(&ack->sem, timeout);
bt_mesh_msg_ack_ctx_clear(ack);
+ if (err == -EAGAIN) {
+ return -ETIMEDOUT;
+ }
+
return err;
}
