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;
sep = US",";
}
-if (s != NULL) s[ptr] = 0; else s = US"";
+if (s) s[ptr] = 0; else s = US"";
log_write(0, LOG_MAIN, "no MAIL in SMTP connection from %s D=%s%s",
host_and_ident(FALSE),
readconf_printtime( (int) ((long)time(NULL) - (long)smtp_connection_start)),
}
+/* Return list of recent smtp commands */
+
+uschar *
+smtp_cmd_hist(void)
+{
+uschar * list = NULL;
+int size = 0, len = 0, i;
+
+for (i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++)
+ if (smtp_connection_had[i] != SCH_NONE)
+ list = string_append_listele(list, &size, &len, ',',
+ smtp_names[smtp_connection_had[i]]);
+for (i = 0; i < smtp_ch_index; i++)
+ list = string_append_listele(list, &size, &len, ',',
+ smtp_names[smtp_connection_had[i]]);
+return list ? list : US"";
+}
+
+
+
/*************************************************
* Check HELO line and set sender_helo_name *
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. */