[Asterisk-cvs] asterisk/channels/h323 ast_h323.cpp,1.55,1.56

jeremy at lists.digium.com jeremy at lists.digium.com
Wed Jul 21 12:50:10 CDT 2004


Update of /usr/cvsroot/asterisk/channels/h323
In directory localhost.localdomain:/tmp/cvs-serv25393

Modified Files:
	ast_h323.cpp 
Log Message:
more changes to properly copy the call token and a small code optimization

Index: ast_h323.cpp
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- ast_h323.cpp	20 Jul 2004 21:04:16 -0000	1.55
+++ ast_h323.cpp	21 Jul 2004 16:36:10 -0000	1.56
@@ -566,7 +566,9 @@
 
 
 	cd.call_reference = GetCallReference();
+	Lock();
 	cd.call_token = strdup((const char *)GetCallToken());
+	Unlock();
 	cd.call_source_aliases  =  strdup((const char *)sourceAliases);
 	cd.call_dest_alias = strdup((const char *)destAliases);
 	cd.call_source_e164 = strdup((const char *)sourceE164);
@@ -617,12 +619,14 @@
 	if ((s1 = strchr(destAliases, '\t')) != NULL)
          	*s1 = '\0';
 
-	cd.call_reference		= GetCallReference();
-	cd.call_token			= strdup((const char *)GetCallToken());
-	cd.call_source_aliases  	= strdup((const char *)sourceAliases);
-	cd.call_dest_alias		= strdup((const char *)destAliases);
-	cd.call_source_e164		= strdup((const char *)sourceE164);
-	cd.call_dest_e164		= strdup((const char *)destE164);
+	cd.call_reference = GetCallReference();
+	Lock();
+	cd.call_token = strdup((const char *)GetCallToken());
+	Unlock();
+	cd.call_source_aliases = strdup((const char *)sourceAliases);
+	cd.call_dest_alias = strdup((const char *)destAliases);
+	cd.call_source_e164 = strdup((const char *)sourceE164);
+	cd.call_dest_e164 = strdup((const char *)destE164);
 
 	int res = on_outgoing_call(cd);	
 		
@@ -1181,15 +1185,12 @@
 		return -1;
 	}
 
-	if (!busy){
+	if (!busy) {
 		connection->AnsweringCall(H323Connection::AnswerCallNow);
-		connection->Unlock();
-
 	} else {
 		connection->AnsweringCall(H323Connection::AnswerCallDenied);
-		connection->Unlock();
-	};
-
+	}
+	connection->Unlock();
 	return 0;
 }
 




More information about the svn-commits mailing list