aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-19 15:22:10 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-19 15:22:10 +0000
commita29d5006cf996c0d294f3086b8071834e5cc401b (patch)
treeb03e836942749c43301f0b98f94fefb4a5591197 /channels
parenta91cb86ea6f6a78beb1a47c61c813e3639feb92b (diff)
Make chan_h323 work with pwlib 1.12.0
(closes issue #12682) Reported by: bamby Patches: pwlib_nopipe.diff uploaded by bamby (license 430) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117081 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/h323/ast_h323.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/channels/h323/ast_h323.cxx b/channels/h323/ast_h323.cxx
index 83c1a8464..32b674dec 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -62,6 +62,12 @@ extern "C" {
#include "cisco-h225.h"
#include "caps_h323.h"
+#include <ptbuildopts.h>
+
+#if PWLIB_MAJOR * 10000 + PWLIB_MINOR * 100 + PWLIB_BUILD >= 1 * 10000 + 12 * 100 + 0
+#define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
+#endif
+
/* PWlib Required Components */
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
@@ -81,7 +87,9 @@ static MyH323EndPoint *endPoint = NULL;
/** PWLib entry point */
static MyProcess *localProcess = NULL;
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
static int _timerChangePipe[2];
+#endif
static unsigned traceOptions = PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine;
@@ -191,8 +199,10 @@ MyProcess::MyProcess(): PProcess("The NuFone Networks",
MyProcess::~MyProcess()
{
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
_timerChangePipe[0] = timerChangePipe[0];
_timerChangePipe[1] = timerChangePipe[1];
+#endif
}
void MyProcess::Main()
@@ -2460,8 +2470,10 @@ void h323_end_process(void)
if (localProcess) {
delete localProcess;
localProcess = NULL;
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
close(_timerChangePipe[0]);
close(_timerChangePipe[1]);
+#endif
}
if (logstream) {
PTrace::SetLevel(0);