Hello Philipp,it is great, that you bring this further. I have done the following changes to your code and uploaded it at http://git.cyrusimap.org/cyrus-imapd, branch dev/sieve/vacation-seconds. If there are no objections within two weeks, I will merge it in master.
If there are no objections about the changes with the dev/libtool branch, I will merge them in master in ten days.
The issue with the parallel build, brought by Bron, is partially resolved now. I will clarify with him the rest.
unit "Change vacation day to seconds":in sieve/bc_dump.c and sieve/sieved.c always output SECONDS (in terms of days converted to seconds), as if the new vacation :seconds was always used, instead of differentiating the output between B_VACATION and B_VACATION_ORIG (but this is my personal opinion how it shall be done. If somebody wants to see "DAYS" when "vacation :days" was uploaded, I can update the code. The idea is, that if Sieve Vacation was written from the beginning to support ":seconds" the output would have never contained DAYS.)
diff --git a/sieve/bc_eval.c b/sieve/bc_eval.c --- a/sieve/bc_eval.c +++ b/sieve/bc_eval.c@@ -1313,12 +1313,9 @@ int sieve_eval_bc(sieve_execute_t *exe, int is_incl, sieve_interp_t *i,
ip = unwrap_string(bc, ip, &message, NULL);
+ seconds = ntohl(bc[ip].value);
+ if (op == B_VACATION_ORIG) {
+ seconds *= DAY2SEC;
- if (op == B_VACATION_ORIG) {
- int days;
- days = ntohl(bc[ip].value);
- seconds = days * DAY2SEC;
- } else {
- seconds = ntohl(bc[ip].value);
}
mime = ntohl(bc[ip+1].value);
(it does the same and is shorter).
unit "Add VACATION :seconds support":
doc/specs.html: I moved the reference of "RFC6131" prior to
draft-ietf-sieve-regex, a to my understanding the order is first RFC,
then internet drafts.
Със здраве Дилян
<<attachment: dilyan_palauzov.vcf>>
