summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-07 20:38:30 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-07 20:38:30 +0000
commit1c8262d019c19b69ca5af09df5fb4fdbb177cdd7 (patch)
tree2d0ef3ae42c6488338619d6f996b666bc95ccae1 /plugins/NewsAggregator
parent873053bb99ee832c06803b81168dcacc758fe8de (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.cpp8
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;