215 lines
7.7 KiB
Diff
215 lines
7.7 KiB
Diff
|
--- opal/src/codec/rfc2833.cxx 2009/03/18 22:44:26 22219
|
||
|
+++ opal/src/codec/rfc2833.cxx 2009/03/18 22:51:48 22220
|
||
|
@@ -156,6 +156,12 @@
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+ // if transmittter is ever in this state, then stop the duration timer
|
||
|
+ if (m_payloadType == RTP_DataFrame::IllegalPayloadType) {
|
||
|
+ PTRACE(2, "RFC2833\tNo payload type, cannot send packet.");
|
||
|
+ return false;
|
||
|
+ }
|
||
|
+
|
||
|
// convert tone to correct code
|
||
|
PINDEX code = ASCIIToRFC2833(tone, m_txCapabilitySet[NSECodeBase]);
|
||
|
|
||
|
--- opal/src/sip/sipcon.cxx 2009/03/19 00:07:23 22223
|
||
|
+++ opal/src/sip/sipcon.cxx 2009/03/19 00:07:41 22224
|
||
|
@@ -146,6 +146,7 @@
|
||
|
{ SIP_PDU::Failure_RequestEntityTooLarge , OpalConnection::EndedByQ931Cause , 127 }, // Interworking (+)
|
||
|
{ SIP_PDU::Failure_RequestURITooLong , OpalConnection::EndedByQ931Cause , 127 }, // Interworking (+)
|
||
|
{ SIP_PDU::Failure_UnsupportedMediaType , OpalConnection::EndedByCapabilityExchange, 79 }, // Service/option not implemented (+)
|
||
|
+ { SIP_PDU::Failure_NotAcceptableHere , OpalConnection::EndedByCapabilityExchange, 79 }, // Service/option not implemented (+)
|
||
|
{ SIP_PDU::Failure_UnsupportedURIScheme , OpalConnection::EndedByQ931Cause , 127 }, // Interworking (+)
|
||
|
{ SIP_PDU::Failure_BadExtension , OpalConnection::EndedByQ931Cause , 127 }, // Interworking (+)
|
||
|
{ SIP_PDU::Failure_ExtensionRequired , OpalConnection::EndedByQ931Cause , 127 }, // Interworking (+)
|
||
|
--- opal/src/opal/call.cxx 2009/03/19 01:36:24 22227
|
||
|
+++ opal/src/opal/call.cxx 2009/03/19 03:16:14 22228
|
||
|
@@ -353,6 +353,7 @@
|
||
|
PSafePtr<OpalConnection> otherConnection;
|
||
|
while (EnumerateConnections(otherConnection, PSafeReadOnly, includeSpecifiedConnection ? NULL : &connection)) {
|
||
|
OpalMediaFormatList possibleFormats = OpalTranscoder::GetPossibleFormats(otherConnection->GetMediaFormats());
|
||
|
+ otherConnection->AdjustMediaFormats(possibleFormats);
|
||
|
if (first) {
|
||
|
commonFormats = possibleFormats;
|
||
|
first = PFalse;
|
||
|
--- opal/src/sip/sippdu.cxx 2009/03/24 01:30:32 22259
|
||
|
+++ opal/src/sip/sippdu.cxx 2009/03/24 02:19:47 22260
|
||
|
@@ -2706,13 +2706,11 @@
|
||
|
{
|
||
|
PSafeLockReadWrite lock(*this);
|
||
|
|
||
|
- if (!lock.IsLocked() || (state != Trying && state != Cancelling))
|
||
|
+ if (!lock.IsLocked() || state > Cancelling || (state == Proceeding && method == Method_INVITE))
|
||
|
return;
|
||
|
|
||
|
retry++;
|
||
|
|
||
|
- PTRACE(3, "SIP\tTransaction " << mime.GetCSeq() << " timeout, making retry " << retry);
|
||
|
-
|
||
|
if (retry >= endpoint.GetMaxRetries()) {
|
||
|
SetTerminated(Terminated_RetriesExceeded);
|
||
|
return;
|
||
|
@@ -2727,11 +2725,16 @@
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
- PTimeInterval timeout = retryTimeoutMin*(1<<retry);
|
||
|
- if (timeout > retryTimeoutMax)
|
||
|
+ if (state > Trying)
|
||
|
retryTimer = retryTimeoutMax;
|
||
|
- else
|
||
|
+ else {
|
||
|
+ PTimeInterval timeout = retryTimeoutMin*(1<<retry);
|
||
|
+ if (timeout > retryTimeoutMax)
|
||
|
+ timeout = retryTimeoutMax;
|
||
|
retryTimer = timeout;
|
||
|
+ }
|
||
|
+
|
||
|
+ PTRACE(3, "SIP\tTransaction " << mime.GetCSeq() << " timeout, making retry " << retry << ", timeout " << retryTimer);
|
||
|
}
|
||
|
|
||
|
|
||
|
--- opal/plugins/video/common/dyna.cxx 2009/03/24 04:35:50 22264
|
||
|
+++ opal/plugins/video/common/dyna.cxx 2009/03/24 04:36:35 22265
|
||
|
@@ -59,17 +59,17 @@
|
||
|
bool DynaLink::InternalOpen(const char * dir, const char *name)
|
||
|
{
|
||
|
char path[1024];
|
||
|
- memset(path, 0, sizeof(path));
|
||
|
+ path[0] = '\0';
|
||
|
|
||
|
// Copy the directory to "path" and add a separator if necessary
|
||
|
- if (strlen(path) > 0) {
|
||
|
+ if (dir != NULL && *dir != '\0') {
|
||
|
strcpy(path, dir);
|
||
|
if (path[strlen(path)-1] != DIR_SEPARATOR[0])
|
||
|
- strcat(path, DIR_SEPARATOR);
|
||
|
+ strcat(path, DIR_SEPARATOR);
|
||
|
}
|
||
|
strcat(path, name);
|
||
|
|
||
|
- if (strlen(path) == 0) {
|
||
|
+ if (path[0] == '\0') {
|
||
|
TRACE(1, _codecString << "\tDYNA\tdir '" << (dir != NULL ? dir : "(NULL)") << "', name '" << (name != NULL ? name : "(NULL)") << "' resulted in empty path");
|
||
|
return false;
|
||
|
}
|
||
|
--- opal/src/rtp/jitter.cxx 2009/03/25 00:52:00 22271
|
||
|
+++ opal/src/rtp/jitter.cxx 2009/03/25 00:58:03 22272
|
||
|
@@ -244,6 +244,7 @@
|
||
|
|
||
|
void OpalJitterBuffer::DeInit(Entry * & /*currentReadFrame*/, PBoolean & /*markerWarning*/)
|
||
|
{
|
||
|
+ bufferMutex.Signal();
|
||
|
}
|
||
|
|
||
|
PBoolean OpalJitterBuffer::PreRead(OpalJitterBuffer::Entry * & currentReadFrame, PBoolean & /*markerWarning*/)
|
||
|
--- opal/src/sip/handlers.cxx 2009/03/10 04:27:59 22186
|
||
|
+++ opal/src/sip/handlers.cxx 2009/04/14 03:00:56 22421
|
||
|
@@ -252,7 +252,6 @@
|
||
|
PBoolean SIPHandler::SendRequest(SIPHandler::State newState)
|
||
|
{
|
||
|
expireTimer.Stop(false); // Stop automatic retry
|
||
|
- bool retryLater = false;
|
||
|
|
||
|
if (expire == 0)
|
||
|
newState = Unsubscribing;
|
||
|
@@ -275,8 +274,6 @@
|
||
|
case Subscribing :
|
||
|
case Refreshing :
|
||
|
case Restoring :
|
||
|
- if (GetTransport() == NULL)
|
||
|
- retryLater = true;
|
||
|
break;
|
||
|
|
||
|
default :
|
||
|
@@ -286,7 +283,7 @@
|
||
|
|
||
|
SetState(newState);
|
||
|
|
||
|
- if (!retryLater) {
|
||
|
+ if (GetTransport() != NULL) {
|
||
|
// Restoring or first time, try every interface
|
||
|
if (newState == Restoring || m_transport->GetInterface().IsEmpty()) {
|
||
|
PWaitAndSignal mutex(m_transport->GetWriteMutex());
|
||
|
@@ -298,19 +295,21 @@
|
||
|
if (WriteSIPHandler(*m_transport))
|
||
|
return true;
|
||
|
}
|
||
|
+
|
||
|
OnFailed(SIP_PDU::Local_TransportError);
|
||
|
- retryLater = true;
|
||
|
}
|
||
|
|
||
|
- if (retryLater) {
|
||
|
- PTRACE(4, "SIP\tRetrying " << GetMethod() << " in " << offlineExpire << " seconds.");
|
||
|
- OnFailed(SIP_PDU::Local_BadTransportAddress);
|
||
|
- expireTimer.SetInterval(0, offlineExpire); // Keep trying to get it back
|
||
|
- SetState(Unavailable);
|
||
|
+ if (newState == Unsubscribing) {
|
||
|
+ // Transport level error, probably never going to get the unsubscribe through
|
||
|
+ SetState(Unsubscribed);
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
- return false;
|
||
|
+ PTRACE(4, "SIP\tRetrying " << GetMethod() << " in " << offlineExpire << " seconds.");
|
||
|
+ OnFailed(SIP_PDU::Local_BadTransportAddress);
|
||
|
+ expireTimer.SetInterval(0, offlineExpire); // Keep trying to get it back
|
||
|
+ SetState(Unavailable);
|
||
|
+ return true;
|
||
|
}
|
||
|
|
||
|
|
||
|
--- opal/src/sip/handlers.cxx 2009/04/15 02:31:56 22427
|
||
|
+++ opal/src/sip/handlers.cxx 2009/04/15 02:34:55 22428
|
||
|
@@ -114,12 +114,21 @@
|
||
|
if (remote.IsEmpty())
|
||
|
m_remoteAddress = m_addressOfRecord;
|
||
|
else if (remote.Find('@') != P_MAX_INDEX)
|
||
|
- m_remoteAddress = remote;
|
||
|
- else if (m_addressOfRecord.GetHostAddress().IsEquivalent(remote))
|
||
|
- m_remoteAddress = m_addressOfRecord;
|
||
|
+ m_remoteAddress = remote; // For third party registrations
|
||
|
else {
|
||
|
- m_remoteAddress = m_proxy = remote;
|
||
|
- m_remoteAddress.SetUserName(m_addressOfRecord.GetUserName());
|
||
|
+ SIPURL remoteURL = remote;
|
||
|
+ if (m_addressOfRecord.GetHostAddress().IsEquivalent(remoteURL.GetHostAddress()))
|
||
|
+ m_remoteAddress = m_addressOfRecord;
|
||
|
+ else {
|
||
|
+ /* Note this sets the proxy field because the user has givena full AOR
|
||
|
+ with a domain for "target" and then specified a specific host name
|
||
|
+ which as far as we are concered is the host to talk to. Setting the
|
||
|
+ proxy will prevent SRV lookups or other things that might stop uis
|
||
|
+ from going to that very specific host.
|
||
|
+ */
|
||
|
+ m_remoteAddress = m_proxy = remoteURL;
|
||
|
+ m_remoteAddress.SetUserName(m_addressOfRecord.GetUserName());
|
||
|
+ }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
--- opal/src/sip/sipep.cxx.orig 2009-04-26 00:20:26.000000000 +0100
|
||
|
+++ opal/src/sip/sipep.cxx 2009-04-26 00:33:00.000000000 +0100
|
||
|
@@ -523,8 +523,17 @@
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
- if (hasFromConnection && hasToConnection)
|
||
|
- token = pdu->GetMethod() != SIP_PDU::NumMethods ? fromToken : toToken;
|
||
|
+ if (hasFromConnection && hasToConnection) {
|
||
|
+ switch (pdu->GetMethod()) {
|
||
|
+ case SIP_PDU::Method_ACK :
|
||
|
+ case SIP_PDU::NumMethods :
|
||
|
+ token = toToken;
|
||
|
+ break;
|
||
|
+
|
||
|
+ default :
|
||
|
+ token = fromToken;
|
||
|
+ }
|
||
|
+ }
|
||
|
else if (hasFromConnection)
|
||
|
token = fromToken;
|
||
|
else if (hasToConnection)
|