"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h323ep.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h323ep.cxx  (h323plus-1_27_0):h323ep.cxx  (h323plus-1_27_1)
skipping to change at line 441 skipping to change at line 441
DH *dh = DH_new(); DH *dh = DH_new();
if (dh == NULL) { if (dh == NULL) {
PTRACE(2, "TLS\tFailed to allocate DH"); PTRACE(2, "TLS\tFailed to allocate DH");
return false; return false;
}; };
BIGNUM* p = BN_bin2bn(dh_p, dh_p.GetSize(), NULL); BIGNUM* p = BN_bin2bn(dh_p, dh_p.GetSize(), NULL);
BIGNUM* g = BN_bin2bn(dh_g, dh_g.GetSize(), NULL); BIGNUM* g = BN_bin2bn(dh_g, dh_g.GetSize(), NULL);
if (p != NULL && g != NULL) if (p != NULL && g != NULL)
{ {
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
dh->p = p; dh->p = p;
dh->g = g; dh->g = g;
#else #else
if (!DH_set0_pqg(dh, p, NULL, g)) { if (!DH_set0_pqg(dh, p, NULL, g)) {
BN_free(g); BN_free(g);
BN_free(p); BN_free(p);
DH_free(dh); DH_free(dh);
return false; return false;
} }
#endif #endif
skipping to change at line 983 skipping to change at line 983
// Clean up any connections that the cleaner thread missed // Clean up any connections that the cleaner thread missed
CleanUpConnections(); CleanUpConnections();
#ifdef H323_TLS #ifdef H323_TLS
if (m_transportContext) { if (m_transportContext) {
delete m_transportContext; delete m_transportContext;
} }
// OpenSSL Cleanup // OpenSSL Cleanup
EVP_cleanup(); EVP_cleanup();
CRYPTO_cleanup_all_ex_data(); CRYPTO_cleanup_all_ex_data();
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
ERR_remove_thread_state(NULL); ERR_remove_thread_state(NULL);
#endif #endif
ERR_free_strings(); ERR_free_strings();
#endif #endif
#ifdef P_STUN #ifdef P_STUN
delete natMethods; delete natMethods;
#endif #endif
#ifdef H323_H460P #ifdef H323_H460P
skipping to change at line 1797 skipping to change at line 1797
H323TransportAddressArray H323EndPoint::GetInterfaceAddresses(PBoolean excludeLo calHost, H323TransportAddressArray H323EndPoint::GetInterfaceAddresses(PBoolean excludeLo calHost,
H323Transport * as sociatedTransport) H323Transport * as sociatedTransport)
{ {
return H323GetInterfaceAddresses(listeners, excludeLocalHost, associatedTra nsport); return H323GetInterfaceAddresses(listeners, excludeLocalHost, associatedTra nsport);
} }
H323Connection * H323EndPoint::MakeCall(const PString & remoteParty, H323Connection * H323EndPoint::MakeCall(const PString & remoteParty,
PString & token, PString & token,
void * userData, void * userData,
PBoolean supplimentary PBoolean supplementary
) )
{ {
return MakeCall(remoteParty, NULL, token, userData, supplimentary); return MakeCall(remoteParty, NULL, token, userData, supplementary);
} }
H323Connection * H323EndPoint::MakeCall(const PString & remoteParty, H323Connection * H323EndPoint::MakeCall(const PString & remoteParty,
H323Transport * transport, H323Transport * transport,
PString & token, PString & token,
void * userData, void * userData,
PBoolean supplimentary PBoolean supplementary
) )
{ {
token = PString::Empty(); token = PString::Empty();
PStringList Addresses; PStringList Addresses;
if (!ResolveCallParty(remoteParty, Addresses)) if (!ResolveCallParty(remoteParty, Addresses))
return NULL; return NULL;
H323Connection * connection = NULL; H323Connection * connection = NULL;
for (PINDEX i = 0; i < Addresses.GetSize(); i++) { for (PINDEX i = 0; i < Addresses.GetSize(); i++) {
connection = InternalMakeCall(PString::Empty(), connection = InternalMakeCall(PString::Empty(),
PString::Empty(), PString::Empty(),
UINT_MAX, UINT_MAX,
Addresses[i], Addresses[i],
transport, transport,
token, token,
userData, userData,
supplimentary supplementary
); );
if (connection != NULL) { if (connection != NULL) {
connection->Unlock(); connection->Unlock();
break; break;
} }
} }
return connection; return connection;
} }
skipping to change at line 1871 skipping to change at line 1871
} }
H323Connection * H323EndPoint::InternalMakeCall(const PString & trasferFromToken , H323Connection * H323EndPoint::InternalMakeCall(const PString & trasferFromToken ,
const PString & callIdentity, const PString & callIdentity,
unsigned capabilityLevel, unsigned capabilityLevel,
const PString & remoteParty, const PString & remoteParty,
H323Transport * transport, H323Transport * transport,
PString & newToken, PString & newToken,
void * userData, void * userData,
PBoolean supplimentary PBoolean supplementary
) )
{ {
PTRACE(2, "H323\tMaking call to: " << remoteParty); PTRACE(2, "H323\tMaking call to: " << remoteParty);
PString alias; PString alias;
H323TransportAddress address; H323TransportAddress address;
if (!ParsePartyName(remoteParty, alias, address)) { if (!ParsePartyName(remoteParty, alias, address)) {
PTRACE(2, "H323\tCould not parse \"" << remoteParty << '"'); PTRACE(2, "H323\tCould not parse \"" << remoteParty << '"');
return NULL; return NULL;
} }
skipping to change at line 1946 skipping to change at line 1946
connectionsMutex.Wait(); connectionsMutex.Wait();
connectionsActive.SetAt(newToken, connectionsActive.RemoveAt(adjustedTok en)); connectionsActive.SetAt(newToken, connectionsActive.RemoveAt(adjustedTok en));
connectionsToBeCleaned -= adjustedToken; connectionsToBeCleaned -= adjustedToken;
PTRACE(3, "H323\tOverwriting call " << adjustedToken << ", renamed to " << newToken); PTRACE(3, "H323\tOverwriting call " << adjustedToken << ", renamed to " << newToken);
connectionsMutex.Signal(); connectionsMutex.Signal();
} }
return NULL; return NULL;
} }
connection->SetRemotePartyName(remoteParty); connection->SetRemotePartyName(remoteParty);
if (supplimentary) if (supplementary)
connection->SetNonCallConnection(); connection->SetNonCallConnection();
(void)connection->Lock(); (void)connection->Lock();
connectionsMutex.Wait(); connectionsMutex.Wait();
connectionsActive.SetAt(newToken, connection); connectionsActive.SetAt(newToken, connection);
connectionsMutex.Signal(); connectionsMutex.Signal();
connection->AttachSignalChannel(newToken, transport, FALSE); connection->AttachSignalChannel(newToken, transport, FALSE);
skipping to change at line 3357 skipping to change at line 3357
H323FileTransferList & filelist H323FileTransferList & filelist
) )
{ {
PTRACE(2,"FT\tAttempt to open File Transfer session! Not implemented Yet!"); PTRACE(2,"FT\tAttempt to open File Transfer session! Not implemented Yet!");
return FALSE; return FALSE;
} }
#endif #endif
void H323EndPoint::SetLocalUserName(const PString & name) void H323EndPoint::SetLocalUserName(const PString & name)
{ {
PAssert(!name, "Must have non-empty string in AliasAddress!"); if (name.IsEmpty()) {
if (name.IsEmpty()) PTRACE(1, "Error: Must have non-empty string in AliasAddress!");
return; return;
}
localAliasNames.RemoveAll(); localAliasNames.RemoveAll();
localAliasNames.SetSize(0); localAliasNames.SetSize(0);
localAliasNames.AppendString(name); localAliasNames.AppendString(name);
} }
PBoolean H323EndPoint::AddAliasName(const PString & name) PBoolean H323EndPoint::AddAliasName(const PString & name)
{ {
PAssert(!name, "Must have non-empty string in AliasAddress!"); if (name.IsEmpty()) {
PTRACE(1, "Error: Must have non-empty string in AliasAddress!");
return FALSE;
}
if (localAliasNames.GetValuesIndex(name) != P_MAX_INDEX) if (localAliasNames.GetValuesIndex(name) != P_MAX_INDEX)
return FALSE; return FALSE;
localAliasNames.AppendString(name); localAliasNames.AppendString(name);
return TRUE; return TRUE;
} }
PBoolean H323EndPoint::RemoveAliasName(const PString & name) PBoolean H323EndPoint::RemoveAliasName(const PString & name)
{ {
PINDEX pos = localAliasNames.GetValuesIndex(name); PINDEX pos = localAliasNames.GetValuesIndex(name);
if (pos == P_MAX_INDEX) if (pos == P_MAX_INDEX)
return FALSE; return FALSE;
PAssert(localAliasNames.GetSize() > 1, "Must have at least one AliasAddress!") if (localAliasNames.GetSize() < 2) {
; PTRACE(1, "Error: Must have at least one AliasAddress!");
if (localAliasNames.GetSize() < 2)
return FALSE; return FALSE;
}
#if PTLIB_VER >= 2110 #if PTLIB_VER >= 2110
localAliasNames.Remove(&name); localAliasNames.Remove(&name);
#else #else
localAliasNames.RemoveAt(pos); localAliasNames.RemoveAt(pos);
#endif #endif
return TRUE; return TRUE;
} }
#ifdef H323_AUDIO_CODECS #ifdef H323_AUDIO_CODECS
 End of changes. 13 change blocks. 
14 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)