20241N/AIndex: src/im/im_mf.cxx
20241N/A===================================================================
20241N/A--- src/im/im_mf.cxx (revision 25159)
20241N/A+++ src/im/im_mf.cxx (working copy)
20241N/A@@ -146,7 +146,7 @@
20241N/A : OpalMediaFormat(OPAL_T140,
20241N/A "t140",
20241N/A RTP_DataFrame::DynamicBase,
20241N/A- "text",
20241N/A+ "t140",
20241N/A false,
20241N/A 1440,
20241N/A 512,
20241N/AIndex: src/im/t140.cxx
20241N/A===================================================================
20241N/A--- src/im/t140.cxx (revision 25159)
20241N/A+++ src/im/t140.cxx (working copy)
20241N/A@@ -84,7 +84,8 @@
20241N/A T140String::T140String()
20241N/A : length(0)
20241N/A {
20241N/A- AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A+ AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A+ SetAt(length, '\0');
20241N/A }
20241N/A
20241N/A T140String::T140String(const PBYTEArray & bytes)
20241N/A@@ -96,6 +97,7 @@
20241N/A ch != ZERO_WIDTH_NO_BREAK)
20241N/A AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A AppendUTF((const BYTE *)bytes, bytes.GetSize());
20241N/A+ SetAt(length, '\0');
20241N/A }
20241N/A
20241N/A T140String::T140String(const BYTE * data, PINDEX len)
20241N/A@@ -107,6 +109,7 @@
20241N/A ch != ZERO_WIDTH_NO_BREAK)
20241N/A AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A AppendUTF((const BYTE *)data, len);
20241N/A+ SetAt(length, '\0');
20241N/A }
20241N/A
20241N/A T140String::T140String(const char * chars)
20241N/A@@ -118,6 +121,7 @@
20241N/A ch != ZERO_WIDTH_NO_BREAK)
20241N/A AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A AppendUTF((const BYTE *)chars, strlen(chars));
20241N/A+ SetAt(length, '\0');
20241N/A }
20241N/A
20241N/A T140String::T140String(const PString & str)
20241N/A@@ -129,17 +133,11 @@
20241N/A ch != ZERO_WIDTH_NO_BREAK)
20241N/A AppendUnicode16(ZERO_WIDTH_NO_BREAK);
20241N/A AppendUTF((const BYTE *)(const char *)str, str.GetLength());
20241N/A+ SetAt(length, '\0');
20241N/A }
20241N/A
20241N/A PINDEX T140String::AppendUTF(const BYTE * utf, PINDEX utfLen)
20241N/A {
20241N/A- WORD ch;
20241N/A- if (utfLen >= 3 &&
20241N/A- GetUTF(utf, utfLen, ch) == 3 &&
20241N/A- ch == ZERO_WIDTH_NO_BREAK) {
20241N/A- utf += 3;
20241N/A- utfLen -= 3;
20241N/A- }
20241N/A if (utfLen > 0) {
20241N/A memcpy(GetPointer(length+utfLen)+length, utf, utfLen);
20241N/A length += utfLen;
20241N/A@@ -184,8 +182,8 @@
20241N/A }
20241N/A
20241N/A //if (c <= 0xffff) {
20241N/A- ptr[0] = 0xe0 | (ch >> 4) | (cl >> 6);
20241N/A- ptr[1] = 0x80 | (ch << 2) | (cl >> 6);
20241N/A+ ptr[0] = 0xe0 | (ch >> 4);
20241N/A+ ptr[1] = 0x80 | ((ch & 0xf) << 2) | (cl >> 6);
20241N/A ptr[2] = 0x80 | (cl & 0x3f);
20241N/A return 3;
20241N/A }
20241N/A@@ -211,7 +209,7 @@
20241N/A
20241N/A // 0x80 .. 0x7ff
20241N/A if (ptr[0] <= 0xdf) {
20241N/A- ch = (ptr[0] << 6) | (ptr[1] & 0x3f);
20241N/A+ ch = ((ptr[0] & 0x1f) << 6) | (ptr[1] & 0x3f);
20241N/A return 2;
20241N/A }
20241N/A
20241N/A@@ -219,7 +217,7 @@
20241N/A return 0;
20241N/A
20241N/A // 0x800 .. 0xffff
20241N/A- ch = (ptr[0] << 12) | ((ptr[1] & 0x3f) << 6) || (ptr[2] & 0x3f);
20241N/A+ ch = ((ptr[0] & 0xf) << 12) | ((ptr[1] & 0x3f) << 6) | (ptr[2] & 0x3f);
20241N/A
20241N/A return 3;
20241N/A }
20241N/AIndex: src/sip/sipcon.cxx
20241N/A===================================================================
20241N/A--- src/sip/sipcon.cxx (revision 25159)
20241N/A+++ src/sip/sipcon.cxx (working copy)
20241N/A@@ -781,7 +781,10 @@
20241N/A if (rtpSession == NULL) {
20241N/A
20241N/A // Not already there, so create one
20241N/A- rtpSession = CreateSession(GetTransport(), rtpSessionId, false);
20241N/A+ // Use default sessionid to create session. Otherwise maybe use the
20241N/A+ // wrong methon to create session.
20241N/A+ // rtpSessionId = mediaType.GetDefinition()->GetDefaultSessionId();
20241N/A+ rtpSession = CreateSession(GetTransport(), rtpSessionId, mediaType.GetDefinition()->GetDefaultSessionId(), false);
20241N/A if (rtpSession == NULL) {
20241N/A PTRACE(1, "SIP\tCould not create RTP session " << rtpSessionId << " for media type " << mediaType << ", released " << *this);
20241N/A Release(OpalConnection::EndedByTransportFail);
20241N/AIndex: src/sip/sippdu.cxx
20241N/A===================================================================
20241N/A--- src/sip/sippdu.cxx (revision 25159)
20241N/A+++ src/sip/sippdu.cxx (working copy)
20241N/A@@ -2299,13 +2299,13 @@
20241N/A
20241N/A mime.SetCompactForm(false);
20241N/A PString strPDU = Build();
20241N/A- if (!transport.IsReliable() && strPDU.GetLength() > 1450) {
20241N/A- PTRACE(4, "SIP\tPDU is too large (" << strPDU.GetLength() << " bytes) trying compact form.");
20241N/A- mime.SetCompactForm(true);
20241N/A- strPDU = Build();
20241N/A- PTRACE_IF(2, strPDU.GetLength() > 1450,
20241N/A- "SIP\tPDU is likely too large (" << strPDU.GetLength() << " bytes) for UDP datagram.");
20241N/A- }
20241N/A+ // if (!transport.IsReliable() && strPDU.GetLength() > 1450) {
20241N/A+ // PTRACE(4, "SIP\tPDU is too large (" << strPDU.GetLength() << " bytes) trying compact form.");
20241N/A+ // mime.SetCompactForm(true);
20241N/A+ // strPDU = Build();
20241N/A+ // PTRACE_IF(2, strPDU.GetLength() > 1450,
20241N/A+ // "SIP\tPDU is likely too large (" << strPDU.GetLength() << " bytes) for UDP datagram.");
20241N/A+ // }
20241N/A
20241N/A #if PTRACING
20241N/A if (PTrace::CanTrace(3)) {
20241N/AIndex: src/sip/sipep.cxx
20241N/A===================================================================
20241N/A--- src/sip/sipep.cxx (revision 25159)
20241N/A+++ src/sip/sipep.cxx (working copy)
20241N/A@@ -1587,9 +1587,12 @@
20241N/A
20241N/A void SIPEndPoint::SIP_PDU_Work::OnReceivedPDU()
20241N/A {
20241N/A+ PTRACE(4, "SIP\tBeing Handled PDU \"" << m_pdu << '"');
20241N/A if (PAssertNULL(m_pdu) == NULL)
20241N/A return;
20241N/A
20241N/A+ PTRACE(4, "SIP\tBeing Handled PDU \"" << *m_pdu << '"');
20241N/A+
20241N/A if (m_pdu->GetMethod() == SIP_PDU::NumMethods) {
20241N/A PString transactionID = m_pdu->GetTransactionID();
20241N/A PTRACE(4, "SIP\tHandling PDU \"" << *m_pdu << "\" for transaction=" << transactionID);
20241N/AIndex: src/opal/rtpconn.cxx
20241N/A===================================================================
20241N/A--- src/opal/rtpconn.cxx (revision 25159)
20241N/A+++ src/opal/rtpconn.cxx (working copy)
20241N/A@@ -105,7 +105,7 @@
20241N/A {
20241N/A RTP_Session * rtpSession = m_rtpSessions.GetSession(sessionID);
20241N/A if (rtpSession == NULL) {
20241N/A- rtpSession = CreateSession(transport, sessionID, rtpqos);
20241N/A+ rtpSession = CreateSession(transport, sessionID, mediaType.GetDefinition()->GetDefaultSessionId(), rtpqos);
20241N/A m_rtpSessions.AddSession(rtpSession, mediaType);
20241N/A }
20241N/A
20241N/A@@ -115,6 +115,7 @@
20241N/A
20241N/A RTP_Session * OpalRTPConnection::CreateSession(const OpalTransport & transport,
20241N/A unsigned sessionID,
20241N/A+ unsigned preferred_sessionId,
20241N/A RTP_QOS * rtpqos)
20241N/A {
20241N/A // We only support RTP over UDP at this point in time ...
20241N/A@@ -132,7 +133,7 @@
20241N/A PNatMethod * natMethod = manager.GetNatMethod(remoteAddress);
20241N/A
20241N/A // create an RTP session
20241N/A- RTP_UDP * rtpSession = CreateRTPSession(sessionID, remoteIsNAT);
20241N/A+ RTP_UDP * rtpSession = CreateRTPSession(sessionID, preferred_sessionId, remoteIsNAT);
20241N/A if (rtpSession == NULL)
20241N/A return NULL;
20241N/A
20241N/A@@ -156,14 +157,16 @@
20241N/A }
20241N/A
20241N/A
20241N/A-RTP_UDP * OpalRTPConnection::CreateRTPSession(unsigned sessionID, bool remoteIsNAT)
20241N/A+RTP_UDP * OpalRTPConnection::CreateRTPSession(unsigned sessionID, unsigned preferred_sessionId, bool remoteIsNAT)
20241N/A {
20241N/A- OpalMediaType mediaType = OpalMediaTypeDefinition::GetMediaTypeForSessionId(sessionID);
20241N/A+ OpalMediaType mediaType = OpalMediaTypeDefinition::GetMediaTypeForSessionId(preferred_sessionId);
20241N/A OpalMediaTypeDefinition * def = mediaType.GetDefinition();
20241N/A+
20241N/A if (def == NULL) {
20241N/A PTRACE(1, "RTPCon\tNo definition for media type " << mediaType);
20241N/A return NULL;
20241N/A }
20241N/A+ PTRACE(1, "RTPCon\t Using media type " << mediaType << " to create RTP session.");
20241N/A
20241N/A #ifdef OPAL_ZRTP
20241N/A // create ZRTP channel if enabled
20241N/AIndex: include/opal/rtpconn.h
20241N/A===================================================================
20241N/A--- include/opal/rtpconn.h (revision 25159)
20241N/A+++ include/opal/rtpconn.h (working copy)
20241N/A@@ -272,6 +272,7 @@
20241N/A virtual RTP_Session * CreateSession(
20241N/A const OpalTransport & transport,
20241N/A unsigned sessionID,
20241N/A+ unsigned preferred_sessionId,
20241N/A RTP_QOS * rtpqos
20241N/A );
20241N/A
20241N/A@@ -279,6 +280,7 @@
20241N/A */
20241N/A virtual RTP_UDP * CreateRTPSession(
20241N/A unsigned sessionId,
20241N/A+ unsigned preferred_sessionId,
20241N/A bool remoteIsNat
20241N/A );
20241N/A //@}