X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fsmtp_in.c;h=92dbac4cee8bebcfa2df72e5cbdc4bd6764b8b3e;hb=f1f7d0cddd4fb38d0bcf81be13d6e272789ff9c7;hp=5ff1b7f32d7e9cf50e3fad89431e90d69534ef7f;hpb=925ac8e4f1c5d365ddea2f7aee460cd0a3cd409d;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 5ff1b7f32..92dbac4ce 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -339,8 +339,8 @@ int fd, rc; fd_set fds; struct timeval tzero; -if (tls_in.active >= 0 && tls_could_read()) - return FALSE; +if (tls_in.active >= 0) + return !tls_could_read(); if (smtp_inptr < smtp_inend) return FALSE; @@ -3011,7 +3011,7 @@ if (rcpt_in_progress) rcpt_in_progress = FALSE; } -/* Not output the message, splitting it up into multiple lines if necessary. +/* Now output the message, splitting it up into multiple lines if necessary. We only handle pipelining these responses as far as nonfinal/final groups, not the whole MAIL/RCPT/DATA response set. */ @@ -4230,26 +4230,34 @@ while (done <= 0) auth_instance *au; BOOL first = TRUE; for (au = auths; au; au = au->next) - if (au->server && (au->advertise_condition == NULL || - expand_check_condition(au->advertise_condition, au->name, - US"authenticator"))) + { + au->advertised = FALSE; + if (au->server) { - int saveptr; - if (first) + DEBUG(D_auth+D_expand) debug_printf_indent( + "Evaluating advertise_condition for %s athenticator\n", + au->public_name); + if ( !au->advertise_condition + || expand_check_condition(au->advertise_condition, au->name, + US"authenticator") + ) { - s = string_catn(s, &size, &ptr, smtp_code, 3); - s = string_catn(s, &size, &ptr, US"-AUTH", 5); - first = FALSE; - auth_advertised = TRUE; + int saveptr; + if (first) + { + s = string_catn(s, &size, &ptr, smtp_code, 3); + s = string_catn(s, &size, &ptr, US"-AUTH", 5); + first = FALSE; + auth_advertised = TRUE; + } + saveptr = ptr; + s = string_catn(s, &size, &ptr, US" ", 1); + s = string_cat (s, &size, &ptr, au->public_name); + while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]); + au->advertised = TRUE; } - saveptr = ptr; - s = string_catn(s, &size, &ptr, US" ", 1); - s = string_cat (s, &size, &ptr, au->public_name); - while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]); - au->advertised = TRUE; } - else - au->advertised = FALSE; + } if (!first) s = string_catn(s, &size, &ptr, US"\r\n", 2); }