ImportantMessage: flush on session detach, not on first print; else we might not...
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Jul 2012 17:30:11 +0000 (19:30 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Jul 2012 17:30:11 +0000 (19:30 +0200)
webcit/webcit.c

index 22bd92a99f87051e8fade0f53db3c3c003ed947b..519a18e0dc6a9cc2f3dd7b9202d90a05ec8863e6 100644 (file)
@@ -863,7 +863,6 @@ void tmplput_importantmessage(StrBuf *Target, WCTemplputParams *TP)
        if (WCC != NULL) {
                if (StrLength(WCC->ImportantMsg) > 0) {
                        StrEscAppend(Target, WCC->ImportantMsg, NULL, 0, 0);
-                       FlushStrBuf(WCC->ImportantMsg);
                }
        }
 }
@@ -973,6 +972,10 @@ SessionDetachModule_WEBCIT
        else
                FlushStrBuf(sess->WBuf);
        FlushStrBuf(sess->HBuf);
+       if (StrLength(sess->ImportantMsg) > 0) {
+               FlushStrBuf(sess->ImportantMsg);
+       }
+
 }
 
 void