summaryrefslogtreecommitdiff
path: root/protocols/Tlen
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tlen')
-rw-r--r--protocols/Tlen/src/tlen_presence.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp
index e36f859f65..60a77916a2 100644
--- a/protocols/Tlen/src/tlen_presence.cpp
+++ b/protocols/Tlen/src/tlen_presence.cpp
@@ -121,17 +121,19 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto)
status = ID_STATUS_INVISIBLE;
}
p = TlenTextDecode(statusNode->text);
- TlenListAddResource(proto, LIST_ROSTER, from, status, p);
- if ((hContact=TlenHContactFromJID(proto, from)) != NULL) {
- if (p != NULL && *p) {
- char* statusMsg_utf8 = mir_utf8encode(p);
- db_set_utf(hContact, "CList", "StatusMsg", statusMsg_utf8);
- mir_free(statusMsg_utf8);
- } else {
- db_unset(hContact, "CList", "StatusMsg");
- }
+ }
+ else
+ p = NULL;
+ TlenListAddResource(proto, LIST_ROSTER, from, status, p);
+ if ((hContact=TlenHContactFromJID(proto, from)) != NULL) {
+ if (p != NULL && *p) {
+ char* statusMsg_utf8 = mir_utf8encode(p);
+ db_set_utf(hContact, "CList", "StatusMsg", statusMsg_utf8);
+ mir_free(statusMsg_utf8);
+ mir_free(p);
+ } else {
+ db_unset(hContact, "CList", "StatusMsg");
}
- if (p) mir_free(p);
}
if ((item=TlenListGetItemPtr(proto, LIST_ROSTER, from)) != NULL) {
// Determine status to show for the contact based on the remaining resources