[ekiga] loudmouth(XMPP): handle the case where the server sends an empty status presence



commit 53207a33942bc8633db819329a47702a6a51d5cf
Author: Julien Puydt <jpuydt free fr>
Date:   Wed Jun 6 11:09:06 2012 +0200

    loudmouth(XMPP): handle the case where the server sends an empty status presence

 plugins/loudmouth/loudmouth-presentity.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/loudmouth/loudmouth-presentity.cpp b/plugins/loudmouth/loudmouth-presentity.cpp
index ad5bbbe..b2e1e19 100644
--- a/plugins/loudmouth/loudmouth-presentity.cpp
+++ b/plugins/loudmouth/loudmouth-presentity.cpp
@@ -238,7 +238,9 @@ LM::Presentity::push_presence (const std::string resource,
   LmMessageNode* status = lm_message_node_find_child (presence, "status");
   if (status != NULL) {
 
-    info.status = lm_message_node_get_value (status);
+    const gchar* status_str = lm_message_node_get_value (status);
+    if (status_str != NULL)
+      info.status = status_str;
   }
 
   LmMessageNode* away = lm_message_node_find_child (presence, "show");



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