Fucked up the sequence of arguments for the floodprotected aide message
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 22 Nov 2014 14:33:31 +0000 (15:33 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 22 Nov 2014 14:33:31 +0000 (15:33 +0100)
citadel/event_client.h
citadel/modules/networkclient/serv_networkclient.c
citadel/modules/pop3client/serv_pop3client.c
citadel/modules/rssclient/serv_rssclient.c

index b21e2cc145e8188d71cd6cb91cf01383cbf3da6e..0c9d5b7a93cd872443ee71a418fc5be5aad10913 100644 (file)
@@ -153,6 +153,7 @@ typedef struct __evcares_data {
        IO_CallBack Fail;      /* the dns lookup didn't work out. */
 } evcares_data;
 
+
 struct AsyncIO {
        long ID;
        ev_tstamp Now;
@@ -220,6 +221,7 @@ typedef struct _IOAddHandler {
 } IOAddHandler;
 
 
+inline static time_t EvGetNow(AsyncIO *IO) { return (time_t) IO->Now;}
 
 extern int DebugEventLoop;
 extern int DebugCAres;
index 41ce83c041a05626a379a269928d939dd0cb8f19..34ea669e5d6e8edf357f816fffad9dc65e57e621 100644 (file)
@@ -211,8 +211,8 @@ eNextState NWC_SendFailureMessage(AsyncIO *IO)
                ChrPtr(NW->IO.ErrMsg),
                "Networker error",
                2, strs, (long*) &lens,
-               IO->Now,
-               IO->ID, CCID);
+               CCID, IO->ID,
+               EvGetNow(IO));
        
        return eAbort;
 }
index 47e93d11f4b88738fc31930c07258f98bb69dbfb..950436dd8ed65d5eaa4954b5cdbba915efc9af56 100644 (file)
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <sysconfig.h>
 
 #if TIME_WITH_SYS_TIME
 # include <sys/time.h>
@@ -432,8 +433,8 @@ eNextState POP3_FetchNetworkUsetableEntry(AsyncIO *IO)
 
                if (CheckIfAlreadySeen("POP3 Item Seen",
                                       RecvMsg->CurrMsg->MsgUID,
-                                      IO->Now,
-                                      IO->Now, //// todo
+                                      EvGetNow(IO),
+                                      EvGetNow(IO) - USETABLE_ANTIEXPIRE,
                                       eCheckUpdate,
                                       IO->ID, CCID)
                    != 0)
@@ -590,8 +591,8 @@ eNextState POP3C_StoreMsgRead(AsyncIO *IO)
                       ChrPtr(RecvMsg->CurrMsg->MsgUID));
        CheckIfAlreadySeen("POP3 Item Seen",
                           RecvMsg->CurrMsg->MsgUID,
-                          IO->Now,
-                          IO->Now, //// todo
+                          EvGetNow(IO),
+                          EvGetNow(IO) - USETABLE_ANTIEXPIRE,
                           eWrite,
                           IO->ID, CCID);
 
index f76b3c01cde642f8b3c0fab5c0d555cc45d13ea1..b9f2361ab5693a94bd070406fd704c01aef452c4 100644 (file)
@@ -402,7 +402,7 @@ eNextState RSSSaveMessage(AsyncIO *IO)
                
                /* write the uidl to the use table so we don't store this item again */
                
-               CheckIfAlreadySeen("RSS Item Insert", RSSAggr->ThisMsg->MsgGUID, IO->Now, 0, eWrite, CCID, IO->ID);
+               CheckIfAlreadySeen("RSS Item Insert", RSSAggr->ThisMsg->MsgGUID, EvGetNow(IO), 0, eWrite, CCID, IO->ID);
        }
 
        if (GetNextHashPos(RSSAggr->Messages,
@@ -428,7 +428,7 @@ eNextState RSS_FetchNetworkUsetableEntry(AsyncIO *IO)
        SetRSSState(IO, eRSSUT);
        seenstamp = CheckIfAlreadySeen("RSS Item Seen",
                                       Ctx->ThisMsg->MsgGUID,
-                                      IO->Now,
+                                      EvGetNow(IO),
                                       antiExpire,
                                       eCheckUpdate,
                                       CCID, IO->ID);
@@ -542,8 +542,9 @@ eNextState RSSAggregator_AnalyseReply(AsyncIO *IO)
                        ChrPtr(ErrMsg),
                        "RSS Aggregation run failure",
                        2, strs, (long*) &lens,
-                       IO->Now,
-                       IO->ID, CCID);
+                       CCID,
+                       IO->ID,
+                       EvGetNow(IO));
                
                FreeStrBuf(&ErrMsg);
                EVRSSC_syslog(LOG_DEBUG,
@@ -557,7 +558,7 @@ eNextState RSSAggregator_AnalyseReply(AsyncIO *IO)
 
        while (pCfg != NULL)
        {
-               UpdateLastKnownGood (pCfg, IO->Now);
+               UpdateLastKnownGood (pCfg, EvGetNow(IO));
                if ((Ctx->roomlist_parts > 1) && 
                    (it == NULL))
                {
@@ -599,8 +600,8 @@ eNextState RSSAggregator_AnalyseReply(AsyncIO *IO)
 
        if (CheckIfAlreadySeen("RSS Whole",
                               guid,
-                              IO->Now,
-                              IO->Now - USETABLE_ANTIEXPIRE,
+                              EvGetNow(IO),
+                              EvGetNow(IO) - USETABLE_ANTIEXPIRE,
                               eCheckUpdate,
                               CCID, IO->ID)
            != 0)