summaryrefslogtreecommitdiff
path: root/channels/h323
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2008-05-19 15:24:44 +0000
committerJoshua Colp <jcolp@digium.com>2008-05-19 15:24:44 +0000
commit0894cae92c215bc4795fc046fd74ad592bc10aa0 (patch)
treebb3eb48c7a6b40092c7085c3ed2e0ed734d47b8c /channels/h323
parentf0093bfc425f5e29f47cd2f6840a609445de0162 (diff)
Merged revisions 117081 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r117081 | file | 2008-05-19 12:22:10 -0300 (Mon, 19 May 2008) | 6 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@117082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/h323')
-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 e3a2d839d..48b876aab 100644
--- a/channels/h323/ast_h323.cxx
+++ b/channels/h323/ast_h323.cxx
@@ -63,6 +63,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
@@ -82,7 +88,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;
@@ -192,8 +200,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()
@@ -2623,8 +2633,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);