[ekiga] Presence: Do not emit a signal in case of error.



commit 9e16cb9697b0ddb96608af54c6e0bd524b8c1670
Author: Damien Sandras <dsandras seconix com>
Date:   Tue Dec 30 15:18:29 2014 +0100

    Presence: Do not emit a signal in case of error.
    
    We were not handling error cases correctly and were emitting signals
    with no presence status, or worse, with error codes in the status
    messages.
    
    Opal has changed in a weird way were m_note and such can contain error
    messages.

 lib/engine/components/opal/opal-account.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index dcaf94a..3883b3d 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -1104,6 +1104,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
 
   case OpalPresenceInfo::Unchanged:
     // do not change presence
+    return;
     break;
   case OpalPresenceInfo::Available:
     new_presence = "available";
@@ -1132,8 +1133,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
   case OpalPresenceInfo::Forbidden:
   case OpalPresenceInfo::Unavailable:
   case OpalPresenceInfo::UnknownUser:
-  //case OpalPresenceInfo::UnknownExtended:
-    new_presence = "unknown";
+    return;
     break;
   /* for reference purposes:
   case OpalPresenceInfo::Appointment:
@@ -1224,6 +1224,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
   case OpalPresenceInfo::StateCount:
     // the above two items are bookkeeping code, so do not consider them
     // shut up the compiler which checks all cases in switch
+    return;
     break;
   default:
     break;


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