[ekiga/v4_0] Ekiga: Fix bug with non text/plain IM/Messages.



commit 16685e7d426b31f6db137fe2110efd47e3cb137e
Author: Damien Sandras <dsandras beip be>
Date:   Sat Feb 9 16:08:50 2013 +0100

    Ekiga: Fix bug with non text/plain IM/Messages.
    
    Some softphones like Bria send intermediate xml messages to indicate the
    user is composing. We do not support this, so better discard such
    messages.

 lib/engine/components/opal/sip-endpoint.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index ff7dca9..898e0f2 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -882,6 +882,9 @@ bool
 Opal::Sip::EndPoint::OnReceivedMESSAGE (OpalTransport & transport,
                                        SIP_PDU & pdu)
 {
+  if (pdu.GetMIME().GetContentType(false) != "text/plain")
+    return false; // Ignore what we do not handle.
+
   PString from = pdu.GetMIME().GetFrom();
   PINDEX j = from.Find (';');
   if (j != P_MAX_INDEX)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]