aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 21:19:00 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 21:19:00 +0000
commitd21bf963e8278010b0857f275552a5418d42a3e6 (patch)
tree61bac895d5d0f87d8c75f994ac83d8c002e620df /channels
parentf5f5ff75d48cf04d628ca10091ab3f9e88e3a013 (diff)
Merged revisions 183028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r183028 | jpeeler | 2009-03-18 16:18:27 -0500 (Wed, 18 Mar 2009) | 4 lines Add some code removed by mistake from commit 182722 that works around a file descriptor leak in versions of PWLib prior to 1.12.0. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@183029 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/h323/ast_h323.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx
index 51ff4d228..d96be20fd 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -87,7 +87,8 @@ extern "C" {
#include "cisco-h225.h"
#include "caps_h323.h"
-#if VERSION(PWLIB_MAJOR, PWLIB_MINOR, PWLIB_BUILD) >= VERSION(1,12,0)
+/* PWLIB_MAJOR renamed to PTLIB_MAJOR in 2.x.x */
+#if (defined(PTLIB_MAJOR) || VERSION(PWLIB_MAJOR, PWLIB_MINOR, PWLIB_BUILD) >= VERSION(1,12,0))
#define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
#endif
@@ -132,6 +133,10 @@ static int channelsOpen;
*/
static MyH323EndPoint *endPoint = NULL;
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
+static int _timerChangePipe[2];
+#endif
+
static unsigned traceOptions = PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine;
class PAsteriskLog : public PObject, public iostream {
@@ -2669,6 +2674,10 @@ void h323_end_process(void)
delete endPoint;
endPoint = NULL;
}
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
+ close(_timerChangePipe[0]);
+ close(_timerChangePipe[1]);
+#endif
if (logstream) {
delete logstream;
logstream = NULL;