From 6776b151a7d7932247dad4c1395ba7ca8c4c1d53 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 8 Mar 2012 12:07:20 -0500 Subject: [PATCH] Repaired several logic issues in sieve.c that were causing the various screens to not appear and/or throwing suppenkaspar alerts --- webcit/sieve.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/webcit/sieve.c b/webcit/sieve.c index 15412e0f8..6b7279365 100644 --- a/webcit/sieve.c +++ b/webcit/sieve.c @@ -564,8 +564,10 @@ HashList *GetSieveScriptListing(StrBuf *Target, WCTemplputParams *TP) ++num_scripts; } } - if ((num_scripts > 0) && (rules_script_active == 0)) + + if ((num_scripts > 0) && (rules_script_active == 0)) { PutBstr(HKEY("__SIEVE:EXTERNAL_SCRIPT"), NewStrBufPlain(HKEY("1"))); + } if (num_scripts > have_rules_script) { @@ -585,18 +587,14 @@ HashList *GetSieveScriptListing(StrBuf *Target, WCTemplputParams *TP) { Ruleset = (SieveListing *) vRuleset; - /* - * its the webcit rule? we don't need to load that here. - */ - if (Ruleset->IsRulesScript) - continue; + // FIXME add logic to skip if it's the webcit generated script - if (!serv_printf("MSIV getscript|%s", ChrPtr(Ruleset->Name))) - break; + serv_printf("MSIV getscript|%s", ChrPtr(Ruleset->Name)); StrBuf_ServGetln(Line); if (GetServerStatus(Line, NULL) == 1) { Ruleset->Content = NewStrBuf(); + Done = 0; while(!Done && (rc = StrBuf_ServGetln(Line), rc >= 0) ) if ( (StrLength(Line)==3) && !strcmp(ChrPtr(Line), "000")) -- 2.30.2