From: Hannes F. <hfr...@us...> - 2007-03-30 06:44:46
|
Update of /cvsroot/openh323/opal/src/iax2 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19249/src/iax2 Modified Files: Tag: MediaTypeBranch iax2ep.cxx Log Message: (Backport from HEAD) Tidied some code when a new connection is created by an endpoint. Now if someone needs to derive a connectino class they can create it without needing to remember to do any more than the new. Fixed various GCC warnings Index: iax2ep.cxx =================================================================== RCS file: /cvsroot/openh323/opal/src/iax2/iax2ep.cxx,v retrieving revision 1.26.2.2 retrieving revision 1.26.2.3 diff -C2 -d -r1.26.2.2 -r1.26.2.3 *** iax2ep.cxx 20 Mar 2007 08:19:18 -0000 1.26.2.2 --- iax2ep.cxx 30 Mar 2007 06:44:45 -0000 1.26.2.3 *************** *** 29,32 **** --- 29,39 ---- * * $Log$ + * Revision 1.26.2.3 2007/03/30 06:44:45 hfriederich + * (Backport from HEAD) + * Tidied some code when a new connection is created by an endpoint. Now + * if someone needs to derive a connectino class they can create it without + * needing to remember to do any more than the new. + * Fixed various GCC warnings + * * Revision 1.26.2.2 2007/03/20 08:19:18 hfriederich * Fix typo in previous commit *************** *** 271,278 **** /* We have completed the extraction of information process. Now we can build the matching connection */ ! IAX2Connection *connection = ! CreateConnection(*GetManager().CreateCall(), f->GetConnectionToken(), ! NULL, url, ieData.callingName); ! if (connection == NULL) { PTRACE(2, "IAX2\tFailed to create IAX2Connection for NEW request from " << f->GetConnectionToken()); delete f; --- 278,284 ---- /* We have completed the extraction of information process. Now we can build the matching connection */ ! IAX2Connection *connection = CreateConnection(*GetManager().CreateCall(), f->GetConnectionToken(), ! NULL, url, ieData.callingName); ! if (!AddConnection(connection)) { PTRACE(2, "IAX2\tFailed to create IAX2Connection for NEW request from " << f->GetConnectionToken()); delete f; *************** *** 280,285 **** } - // add the connection to the endpoint list - connectionsActive.SetAt(connection->GetToken(), connection); connection->OnIncomingConnection(0, NULL); --- 286,289 ---- *************** *** 479,485 **** callId << "iax2:" << ip.AsString() << "OutgoingCall" << PString(++callsEstablished); IAX2Connection * connection = CreateConnection(call, callId, userData, remotePartyName); ! if (connection == NULL) return FALSE; - connectionsActive.SetAt(connection->GetToken(), connection); //search through the register srcProcessors to see if there is a relevant userName --- 483,488 ---- callId << "iax2:" << ip.AsString() << "OutgoingCall" << PString(++callsEstablished); IAX2Connection * connection = CreateConnection(call, callId, userData, remotePartyName); ! if (!AddConnection(connection)) return FALSE; //search through the register srcProcessors to see if there is a relevant userName *************** *** 520,527 **** const PString & remotePartyName) { ! IAX2Connection * conn = new IAX2Connection(call, *this, token, userData, remoteParty, remotePartyName); ! if (conn != NULL) ! OnNewConnection(call, *conn); ! return conn; } --- 523,527 ---- const PString & remotePartyName) { ! return new IAX2Connection(call, *this, token, userData, remoteParty, remotePartyName); } |