tweak the logic in MakeCall

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1001 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Jeremy McNamara 23 years ago
parent ba9786d714
commit 21524d6652

@ -185,6 +185,7 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
unsigned int *callReference, unsigned int port) unsigned int *callReference, unsigned int port)
{ {
PString fullAddress; PString fullAddress;
MyH323Connection * connection;
/* Determine whether we are using a gatekeeper or not. */ /* Determine whether we are using a gatekeeper or not. */
if (GetGatekeeper() != NULL) { if (GetGatekeeper() != NULL) {
@ -197,18 +198,14 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token,
cout << " -- Making call to " << fullAddress << "." << endl; cout << " -- Making call to " << fullAddress << "." << endl;
} }
if (!H323EndPoint::MakeCall(fullAddress, token)) { if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) {
if (h323debug) if (h323debug)
cout << "Error making call to \"" << fullAddress << '"' << endl; cout << "Error making call to \"" << fullAddress << '"' << endl;
return 1; return 1;
} }
MyH323Connection * connection = (MyH323Connection *)FindConnectionWithLock(token); *callReference = connection->GetCallReference();
connection->Unlock();
if (connection != NULL) {
*callReference = connection->GetCallReference();
connection->Unlock();
}
if (h323debug) { if (h323debug) {
cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl; cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl;

Loading…
Cancel
Save