mq_timedreceive() move the location where the errno value is set; the TIMEDOUT errno setting was being overwritten by subsequent actions before returning. Noted by Freddie Chopin.
This commit is contained in:
parent
f0da343f24
commit
84f0303fc0
@ -258,11 +258,13 @@ ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen,
|
||||
|
||||
if (result != OK)
|
||||
{
|
||||
set_errno(result);
|
||||
irqrestore(saved_state);
|
||||
sched_unlock();
|
||||
|
||||
wd_delete(rtcb->waitdog);
|
||||
rtcb->waitdog = NULL;
|
||||
|
||||
set_errno(result);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,8 @@ errout_with_irqsave:
|
||||
|
||||
errout_with_mqmsg:
|
||||
mq_msgfree(mqmsg);
|
||||
set_errno(result);
|
||||
sched_unlock();
|
||||
|
||||
set_errno(result);
|
||||
return ERROR;
|
||||
}
|
||||
|
@ -143,4 +143,3 @@ void mq_waitirq(FAR struct tcb_s *wtcb, int errcode)
|
||||
|
||||
irqrestore(saved_state);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user