From 1c8262d019c19b69ca5af09df5fb4fdbb177cdd7 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 7 Dec 2014 20:38:30 +0000 Subject: NewsAggregator: one fix for timestamp git-svn-id: http://svn.miranda-ng.org/main/trunk@11266 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/CheckFeed.cpp | 8 ++++---- 1 file 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, 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; -- cgit v1.2.3