aboutsummaryrefslogtreecommitdiffstats
path: root/channels/h323
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 21:18:27 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-18 21:18:27 +0000
commitec61d5502de636734bbdf62f9d011dba6c1b0ff1 (patch)
treed7ed8252fe3924ed0c07678bbf269a12739458a7 /channels/h323
parentd0f1a81e39612dd35da185232dc73cdcc481e16f (diff)
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/trunk@183028 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/h323')
-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 489cf7a12..9194976fe 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -88,7 +88,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
@@ -133,6 +134,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 {
@@ -2670,6 +2675,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;