projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
001aa70
)
Stop processing if the Sieve script is empty.
author
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 28 Feb 2012 16:25:12 +0000
(11:25 -0500)
committer
Art Cancro
<ajc@uncensored.citadel.org>
Tue, 28 Feb 2012 16:25:12 +0000
(11:25 -0500)
citadel/modules/sieve/serv_sieve.c
patch
|
blob
|
history
diff --git
a/citadel/modules/sieve/serv_sieve.c
b/citadel/modules/sieve/serv_sieve.c
index b52bb3bdb51ecaf4ac8a08be9bfe5faa87b87e47..71e7f753261d2df122ee03318866d38f080669fc 100644
(file)
--- a/
citadel/modules/sieve/serv_sieve.c
+++ b/
citadel/modules/sieve/serv_sieve.c
@@
-889,7
+889,14
@@
void sieve_do_room(char *roomname) {
return;
}
- /* FIXME this is where we have to check for empty scripts */
+ /*
+ * Check to see whether the script is empty and should not be processed.
+ * A script is considered non-empty if it contains at least one semicolon.
+ */
+ if ((strchr(get_active_script(&u), ';') == NULL)) {
+ syslog(LOG_DEBUG, "Sieve script is empty. No processing is required.");
+ return;
+ }
syslog(LOG_DEBUG, "Rules found. Performing Sieve processing for <%s>", roomname);