Commit 244aa3cb authored by Federico Vaga's avatar Federico Vaga

sw:fw: discard messages on dispatch error

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 4b3f1d5f
......@@ -339,6 +339,8 @@ static inline int rt_action_run(enum trtl_mq_type type,
* @param[in] type MQ type
* @param[in] idx_mq MQ index
* @return 0 on success. -1 on error
*
* If the message is not acceptable, this function will discard it.
*/
int trtl_fw_mq_action_dispatch(enum trtl_mq_type type, unsigned int idx_mq)
{
......@@ -358,7 +360,8 @@ int trtl_fw_mq_action_dispatch(enum trtl_mq_type type, unsigned int idx_mq)
trtl_fw_print_message(&msg);
if (!(msg.header->flags & TRTL_HMQ_HEADER_FLAG_RPC)) {
return -EINVAL;
err = -EINVAL;
goto out;
}
if (msg.header->rt_app_id &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment