From 5afb21b180c3bedc288f53dc4f29545526432004 Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Thu, 24 Jun 2010 15:25:58 -0400 Subject: [PATCH] freetdm: fix io trace file closure --- libs/freetdm/src/ftdm_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index abcb3d6fb2..dca616e74b 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -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); }