[Asterisk-cvs] asterisk/channels/h323 ast_h323.h,1.16,1.17 ast_h323.cpp,1.31,1.32

jeremy at lists.digium.com jeremy at lists.digium.com
Mon Jan 12 21:14:19 CST 2004


Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv23011

Modified Files:
	ast_h323.h ast_h323.cpp 
Log Message:
Fix it so we can be unloaded/loaded at will


Index: ast_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ast_h323.h	11 Jan 2004 02:22:32 -0000	1.16
+++ ast_h323.h	13 Jan 2004 03:06:06 -0000	1.17
@@ -215,9 +215,6 @@
 	
     	void SetEndpointTypeInfo( H225_EndpointType & info ) const;
     	void SetGateway(void);
-
-	H323TransportUDP *rasChannel;
-
 };
 
 class MyH323Connection : public H323Connection {

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- ast_h323.cpp	11 Jan 2004 02:22:32 -0000	1.31
+++ ast_h323.cpp	13 Jan 2004 03:06:06 -0000	1.32
@@ -25,8 +25,10 @@
  *
  * Version Info: $Id$
  */
+#include <asterisk/logger.h>
 #include "ast_h323.h"
 
+
 /* PWlib Required Components  */
 #define MAJOR_VERSION 1
 #define MINOR_VERSION 0
@@ -63,7 +65,7 @@
 
 void MyProcess::Main()
 {
-	cout << "  == Creating H.323 Endpoint" << endl;
+	ast_verbose("  == Creating H.323 Endpoint\n");
 	endPoint = new MyH323EndPoint();
 	PTrace::Initialise(0, NULL, PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine);
 }
@@ -492,7 +494,7 @@
 {
 	
 	if (h323debug) {
-		cout << "	-- Received SETUP message..." << endl;
+		ast_verbose("	-- Received SETUP message\n");
 	}
 	
 	call_details_t cd;
@@ -948,6 +950,7 @@
 {
 	PString gkName = PString(gatekeeper);
 	PString pass   = PString(secret);
+	H323TransportUDP *rasChannel;
 
 	if (!h323_end_point_exist()) {
 		cout << "ERROR: [h323_set_gk] No Endpoint, this is bad!" << endl;
@@ -972,17 +975,13 @@
 			return 1;
 		}	
 	} else {
-		/* Gatekeeper operations */
-		if (endPoint->rasChannel) {
-			delete endPoint->rasChannel;
-		}
-		endPoint->rasChannel = new H323TransportUDP(*endPoint);
+		rasChannel = new H323TransportUDP(*endPoint);
 
-		if (!endPoint->rasChannel) {
+		if (!rasChannel) {
 			cout << "  *** No RAS Channel, this is bad" << endl;
 			return 1;
 		}
-		if (endPoint->SetGatekeeper(gkName, endPoint->rasChannel)) {
+		if (endPoint->SetGatekeeper(gkName, rasChannel)) {
 			cout << "  == Using " << (endPoint->GetGatekeeper())->GetName() << " as our Gatekeeper." << endl;
 		} else {
 			cout << "  *** Error registering with gatekeeper \"" << gkName << "\". " << endl;




More information about the svn-commits mailing list