X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexpand.c;h=cfde23610acafb6d200cfd3934179e802f45ac67;hb=91bde4a0253d38118dc227e184b793d476a013ce;hp=fd55436a24a925df20ccdad83dab403e1b720247;hpb=3367f8c2e08bf998efc84050e39d5a9fbdffb5dd;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/expand.c b/src/src/expand.c index fd55436a2..cfde23610 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -3050,6 +3050,8 @@ switch(cond_type) "value \"%s\"", t); return NULL; } + DEBUG(D_expand) debug_printf("%s: condition evaluated to %s\n", ourname, + boolvalue? "true":"false"); if (yield != NULL) *yield = (boolvalue == testfor); return s; } @@ -4110,7 +4112,7 @@ while (*s != 0) save_expand_strings(save_expand_nstring, save_expand_nlength); while (isspace(*s)) s++; - next_s = eval_condition(s, &resetok, skipping? NULL : &cond); + next_s = eval_condition(s, &resetok, skipping ? NULL : &cond); if (next_s == NULL) goto EXPAND_FAILED; /* message already set */ DEBUG(D_expand) @@ -4174,11 +4176,13 @@ while (*s != 0) goto EXPAND_FAILED; } - if (!(encoded = imap_utf7_encode(sub_arg[0], headers_charset, - sub_arg[1][0], sub_arg[2], &expand_string_message))) - goto EXPAND_FAILED; if (!skipping) + { + if (!(encoded = imap_utf7_encode(sub_arg[0], headers_charset, + sub_arg[1][0], sub_arg[2], &expand_string_message))) + goto EXPAND_FAILED; yield = string_cat(yield, &size, &ptr, encoded); + } continue; } #endif @@ -4656,7 +4660,6 @@ while (*s != 0) prvscheck_keynum = NULL; } else - { /* Does not look like a prvs encoded address, return the empty string. We need to make sure all subs are expanded first, so as to skip over the entire item. */ @@ -4667,7 +4670,6 @@ while (*s != 0) case 2: case 3: goto EXPAND_FAILED; } - } continue; } @@ -7121,7 +7123,7 @@ while (*s != 0) const uschar * s = sub; uschar c; - for (s = sub; c = *s; s++) + for (s = sub; (c = *s); s++) yield = c < 127 && c != '\\' ? string_catn(yield, &size, &ptr, s, 1) : string_catn(yield, &size, &ptr, string_sprintf("\\%03o", c), 4);