Send crashmessage just once per day.
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 17 Feb 2015 19:20:05 +0000 (20:20 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 17 Feb 2015 19:20:05 +0000 (20:20 +0100)
citadel/msgbase.c
citadel/msgbase.h
citadel/sysdep.c

index 135fe0e39b7f53c73882e3f0bbe46859ae4a054b..ddc12aafdba517bfa33030a5873582455138d836 100644 (file)
@@ -3050,7 +3050,7 @@ void flood_protect_quickie_message(const char *from,
                                   const char *subject,
                                   int nCriterions,
                                   const char **CritStr,
-                                  long *CritStrLen,
+                                  const long *CritStrLen,
                                   long ccid,
                                   long ioid,
                                   time_t NOW)
@@ -3088,7 +3088,7 @@ void flood_protect_quickie_message(const char *from,
                                       eUpdate,
                                       ccid,
                                       ioid);
-       if (seenstamp < tsday)
+       if ((seenstamp > 0) && (seenstamp < tsday))
        {
                FreeStrBuf(&guid);
                /* yes, we did. flood protection kicks in. */
index e4e2317b61b4a982d331b0c1616436b6178a0221..6d5f726baafd6fe68cd73aa999829c6b3631cbb1 100644 (file)
@@ -96,7 +96,7 @@ void flood_protect_quickie_message(const char *from,
                                   const char *subject,
                                   int nCriterions,
                                   const char **CritStr,
-                                  long *CritStrLen,
+                                  const long *CritStrLen,
                                   long ccid,
                                   long ioid,
                                   time_t NOW);
index 19e5eb5ce7a5df1f1b219a801b270426b14e4325..787a93a3df8eae8cb16b3ab76232e1af009f8fea 100644 (file)
@@ -1100,7 +1100,8 @@ void checkcrash(void)
        if (nFireUpsNonRestart != nFireUps)
        {
                StrBuf *CrashMail;
-
+               const char *msgs[1] = {"crash"};
+               const long lens[1] = {sizeof("crash") - 1};
                CrashMail = NewStrBuf();
                syslog(LOG_ALERT, "Posting crash message\n");
                StrBufPrintf(CrashMail, 
@@ -1117,7 +1118,11 @@ void checkcrash(void)
                        " If you have already done this, the core dump is likely to be found at %score.%d\n"
                        ,
                        ctdl_run_dir, ForkedPid);
-               CtdlAideMessage(ChrPtr(CrashMail), "Citadel server process terminated unexpectedly");
+               CtdlAideFPMessage(ChrPtr(CrashMail),
+                                 "Citadel server process terminated unexpectedly",
+                                 1, msgs, lens,
+                                 0, 0,
+                                 time(NULL));
                FreeStrBuf(&CrashMail);
        }
 }