[asterisk-commits] file: branch 1.4 r117081 - /branches/1.4/channels/h323/ast_h323.cxx

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 19 10:22:11 CDT 2008


Author: file
Date: Mon May 19 10:22:10 2008
New Revision: 117081

URL: http://svn.digium.com/view/asterisk?view=rev&rev=117081
Log:
Make chan_h323 work with pwlib 1.12.0
(closes issue #12682)
Reported by: bamby
Patches:
      pwlib_nopipe.diff uploaded by bamby (license 430)

Modified:
    branches/1.4/channels/h323/ast_h323.cxx

Modified: branches/1.4/channels/h323/ast_h323.cxx
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/h323/ast_h323.cxx?view=diff&rev=117081&r1=117080&r2=117081
==============================================================================
--- branches/1.4/channels/h323/ast_h323.cxx (original)
+++ branches/1.4/channels/h323/ast_h323.cxx Mon May 19 10:22:10 2008
@@ -62,6 +62,12 @@
 #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 @@
 /** 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()
 {
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
 	_timerChangePipe[0] = timerChangePipe[0];
 	_timerChangePipe[1] = timerChangePipe[1];
+#endif
 }
 
 void MyProcess::Main()
@@ -2460,8 +2470,10 @@
 	if (localProcess) {
 		delete localProcess;
 		localProcess = NULL;
+#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
 		close(_timerChangePipe[0]);
 		close(_timerChangePipe[1]);
+#endif
 	}
 	if (logstream) {
 		PTrace::SetLevel(0);




More information about the asterisk-commits mailing list