summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_util.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-01-10 20:23:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-01-10 20:23:54 +0000
commit2fc79125a87a719f40977dd3f7830d81628f030f (patch)
tree89fdf148e34fc12ac24e79206c6a408118758c9d /protocols/JabberG/src/jabber_util.cpp
parente1a9895ffcc730f80fd776b864842215e2e4a561 (diff)
simplier version of the previous patch
git-svn-id: http://svn.miranda-ng.org/main/trunk@3039 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rw-r--r--protocols/JabberG/src/jabber_util.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 795c237033..a80be6ce88 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -1553,15 +1553,15 @@ BOOL CJabberProto::EnterString(TCHAR *result, size_t resultLen, TCHAR *caption,
}
// XEP-0203 delay support
-void JabberReadXep203delay(HXML node, time_t &msgTime)
+bool JabberReadXep203delay(HXML node, time_t &msgTime)
{
HXML n = xmlGetChildByTag(node, "delay", "xmlns", _T("urn:xmpp:delay"));
if (n == NULL)
- return;
+ return false;
const TCHAR *ptszTimeStamp = xmlGetAttrValue(n, _T("stamp"));
if (ptszTimeStamp == NULL)
- return;
+ return false;
// skip '-' chars
TCHAR* szStamp = NEWTSTR_ALLOCA(ptszTimeStamp);
@@ -1574,6 +1574,7 @@ void JabberReadXep203delay(HXML node, time_t &msgTime)
break;
};
msgTime = JabberIsoToUnixTime(szStamp);
+ return msgTime != 0;
}
////////////////////////////////////////////////////////////////////////