Commit 68c57db8 authored by Federico Vaga's avatar Federico Vaga Committed by Federico Vaga

lib: bugfix async return value 0 is not an error

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 0fc5ec09
......@@ -272,12 +272,14 @@ static inline int trtl_rt_variable(struct trtl_dev *trtl,
&msg, 1000);
if (err > 0)
trtl_message_unpack(&msg, hdr, variables);
if (err == 0)
err = -1;
} else {
err = trtl_hmq_send(hmq, &msg);
}
trtl_hmq_close(hmq);
return err <= 0 ? -1 : 0;
return err < 0 ? -1 : 0;
}
......
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