freetdm: fix io trace file closure

This commit is contained in:
Moises Silva 2010-06-24 15:25:58 -04:00
parent 29ce4bbdd1
commit 5afb21b180
1 changed files with 3 additions and 3 deletions

View File

@ -2252,9 +2252,9 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
close(ftdmchan->fds[FTDM_READ_TRACE_INDEX]);
ftdmchan->fds[FTDM_READ_TRACE_INDEX] = -1;
}
if (ftdmchan->fds[FTDM_READ_TRACE_INDEX] > 0) {
close(ftdmchan->fds[FTDM_READ_TRACE_INDEX]);
ftdmchan->fds[FTDM_READ_TRACE_INDEX] = -1;
if (ftdmchan->fds[FTDM_WRITE_TRACE_INDEX] > 0) {
close(ftdmchan->fds[FTDM_WRITE_TRACE_INDEX]);
ftdmchan->fds[FTDM_WRITE_TRACE_INDEX] = -1;
}
GOTO_STATUS(done, FTDM_SUCCESS);
}