Commit 4ae03dfa authored by Federico Vaga's avatar Federico Vaga

Merge branch 'hotfix/v4.0.1'

parents 1c2e49ef add8319c
# Change Log
## [4.0.0] -2019-05-14
## [4.0.1] - 2019-09-13
### Software
#### Fixed
- File Descriptor closed correctly so that the same process can do
``trtl_open()`` and ``trtl_close()`` multiple times
## [4.0.0] - 2019-05-14
### Documentation
#### Changed
- moved to sphinx and ReST
......
......@@ -344,12 +344,14 @@ void trtl_close(struct trtl_dev *trtl)
/* Close all the file descriptors */
if (wdesc->fd_dev >= 0)
close(wdesc->fd_dev);
for (i = 0; i < TRTL_MAX_CPU; ++i) {
for (i = 0; i < wdesc->cfgrom.n_cpu; ++i) {
if (wdesc->fd_cpu[i] >= 0)
close(wdesc->fd_cpu[i]);
for (k = 0; k < TRTL_MAX_MQ_CHAN; ++k) {
for (k = 0; k < wdesc->cfgrom.n_hmq[i]; ++k) {
if (wdesc->fd_hmq[i][k] >= 0)
close(wdesc->fd_hmq[i][k]);
if (wdesc->fd_hmq_sync[i][k] >= 0)
close(wdesc->fd_hmq_sync[i][k]);
}
}
......
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