diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-07 20:38:30 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-07 20:38:30 +0000 |
commit | 1c8262d019c19b69ca5af09df5fb4fdbb177cdd7 (patch) | |
tree | 2d0ef3ae42c6488338619d6f996b666bc95ccae1 /plugins/NewsAggregator | |
parent | 873053bb99ee832c06803b81168dcacc758fe8de (diff) |
NewsAggregator: one fix for timestamp
git-svn-id: http://svn.miranda-ng.org/main/trunk@11266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r-- | plugins/NewsAggregator/Src/CheckFeed.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index acd2291594..b1efb248b6 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -119,9 +119,6 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin else
StrReplace(_T("#<category>#"), category, message);
- if (stamp == 0)
- stamp = time(NULL);
-
DBEVENTINFO olddbei = { 0 };
olddbei.cbSize = sizeof(olddbei);
@@ -137,7 +134,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin db_event_get(hDbEvent, &olddbei);
// there's no need to look for the elder events
- if (olddbei.timestamp < (DWORD)stamp)
+ if (stamp > 0 && olddbei.timestamp < (DWORD)stamp)
break;
if (strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
@@ -148,6 +145,9 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin mir_free(pbBuffer);
if (!MesExist) {
+ if (stamp == 0)
+ stamp = time(NULL);
+
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_TCHAR;
recv.timestamp = stamp;
|