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: https://origsvn.digium.com/svn/asterisk/trunk@183028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
certified/1.8.6
Jeff Peeler 17 years ago
parent a12ddc0c15
commit d22073161f

@ -88,7 +88,8 @@ extern "C" {
#include "cisco-h225.h" #include "cisco-h225.h"
#include "caps_h323.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 #define SKIP_PWLIB_PIPE_BUG_WORKAROUND 1
#endif #endif
@ -133,6 +134,10 @@ static int channelsOpen;
*/ */
static MyH323EndPoint *endPoint = NULL; static MyH323EndPoint *endPoint = NULL;
#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
static int _timerChangePipe[2];
#endif
static unsigned traceOptions = PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine; static unsigned traceOptions = PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine;
class PAsteriskLog : public PObject, public iostream { class PAsteriskLog : public PObject, public iostream {
@ -2670,6 +2675,10 @@ void h323_end_process(void)
delete endPoint; delete endPoint;
endPoint = NULL; endPoint = NULL;
} }
#ifndef SKIP_PWLIB_PIPE_BUG_WORKAROUND
close(_timerChangePipe[0]);
close(_timerChangePipe[1]);
#endif
if (logstream) { if (logstream) {
delete logstream; delete logstream;
logstream = NULL; logstream = NULL;

Loading…
Cancel
Save