diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-05-12 03:57:43 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-05-12 03:57:43 +0000 |
commit | 11dc83355e514517f8a7e5bb6b5a9de05a41dca0 (patch) | |
tree | 451c65bad906e31c9cb0b53eaee542329f422203 /channels | |
parent | fcf6a9c24c506d880ab3636e0c642cb6d764a607 (diff) |
tweak the logic in MakeCall
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1001 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/h323/ast_h323.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/channels/h323/ast_h323.cpp b/channels/h323/ast_h323.cpp index e4fe560b8..51469087b 100755 --- a/channels/h323/ast_h323.cpp +++ b/channels/h323/ast_h323.cpp @@ -185,7 +185,8 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token, unsigned int *callReference, unsigned int port) { PString fullAddress; - + MyH323Connection * connection; + /* Determine whether we are using a gatekeeper or not. */ if (GetGatekeeper() != NULL) { fullAddress = dest; @@ -197,18 +198,14 @@ int MyH323EndPoint::MakeCall(const PString & dest, PString & token, cout << " -- Making call to " << fullAddress << "." << endl; } - if (!H323EndPoint::MakeCall(fullAddress, token)) { + if (!(connection = (MyH323Connection *)H323EndPoint::MakeCallLocked(fullAddress, token))) { if (h323debug) cout << "Error making call to \"" << fullAddress << '"' << endl; return 1; } - MyH323Connection * connection = (MyH323Connection *)FindConnectionWithLock(token); - - if (connection != NULL) { - *callReference = connection->GetCallReference(); - connection->Unlock(); - } + *callReference = connection->GetCallReference(); + connection->Unlock(); if (h323debug) { cout << " -- " << GetLocalUserName() << " is calling host " << fullAddress << endl; |