Commit 520ee3e6 520ee3e69ef03af0af163da6a5e2e1d086317c49 by Sergey Poznyakoff

(vacation_subject): Improve yesterday's fix, following Kostas' suggestion.

1 parent 052deceb
...@@ -400,14 +400,11 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags, ...@@ -400,14 +400,11 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags,
400 mu_sieve_value_t *arg; 400 mu_sieve_value_t *arg;
401 char *value; 401 char *value;
402 char *subject; 402 char *subject;
403 int subject_allocated; 403 int subject_allocated = 0;
404 mu_header_t hdr; 404 mu_header_t hdr;
405 405
406 if (mu_sieve_tag_lookup (tags, "subject", &arg)) 406 if (mu_sieve_tag_lookup (tags, "subject", &arg))
407 { 407 subject = arg->v.string;
408 subject = arg->v.string;
409 subject_allocated = 0;
410 }
411 else if (mu_message_get_header (msg, &hdr) == 0 408 else if (mu_message_get_header (msg, &hdr) == 0
412 && mu_header_aget_value_unfold (hdr, MU_HEADER_SUBJECT, &value) == 0) 409 && mu_header_aget_value_unfold (hdr, MU_HEADER_SUBJECT, &value) == 0)
413 { 410 {
...@@ -449,7 +446,7 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags, ...@@ -449,7 +446,7 @@ vacation_subject (mu_sieve_machine_t mach, mu_list_t tags,
449 free (value); 446 free (value);
450 } 447 }
451 else 448 else
452 subject = "Re:"; 449 subject = "Re: Your mail";
453 450
454 if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable", 451 if (mu_rfc2047_encode (MU_SIEVE_CHARSET, "quoted-printable",
455 subject, &value)) 452 subject, &value))
......