[asterisk-commits] pcadach: branch pcadach/chan_h323-live r41043 -
/team/pcadach/chan_h323-live/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Aug 25 02:23:00 MST 2006
Author: pcadach
Date: Fri Aug 25 04:22:59 2006
New Revision: 41043
URL: http://svn.digium.com/view/asterisk?rev=41043&view=rev
Log:
Close file descriptors on shutdown
Modified:
team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp
team/pcadach/chan_h323-live/channels/h323/ast_h323.h
Modified: team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp?rev=41043&r1=41042&r2=41043&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp (original)
+++ team/pcadach/chan_h323-live/channels/h323/ast_h323.cpp Fri Aug 25 04:22:59 2006
@@ -71,6 +71,8 @@
/** PWLib entry point */
MyProcess *localProcess = NULL;
+static int _timerChangePipe[2];
+
class PAsteriskLog : public PObject, public iostream {
PCLASSINFO(PAsteriskLog, PObject);
@@ -150,9 +152,19 @@
Resume();
}
+MyProcess::~MyProcess()
+{
+ _timerChangePipe[0] = timerChangePipe[0];
+ _timerChangePipe[1] = timerChangePipe[1];
+}
+
void MyProcess::Main()
{
cout << " == Creating H.323 Endpoint" << endl;
+ if (endPoint) {
+ cout << " == ENDPOINT ALREADY CREATED" << endl;
+ return;
+ }
endPoint = new MyH323EndPoint();
/* Due to a bug in the H.323 recomendation/stack we should request a sane
amount of bandwidth from the GK - this function is ignored if not using a GK
@@ -1723,6 +1735,8 @@
if (localProcess) {
delete localProcess;
localProcess = NULL;
+ close(_timerChangePipe[0]);
+ close(_timerChangePipe[1]);
}
PTrace::SetLevel(0);
PTrace::SetStream(&cout);
Modified: team/pcadach/chan_h323-live/channels/h323/ast_h323.h
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/ast_h323.h?rev=41043&r1=41042&r2=41043&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/ast_h323.h (original)
+++ team/pcadach/chan_h323-live/channels/h323/ast_h323.h Fri Aug 25 04:22:59 2006
@@ -268,6 +268,7 @@
public:
MyProcess();
+ ~MyProcess();
void Main();
};
More information about the asterisk-commits
mailing list