mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-24 07:49:58 +01:00
fix buffering issue introduced with the simplifed handle_data()
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
1d0019ff35
commit
2ca822c689
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#define VERSION "1.3.4"
|
#define VERSION "1.3.4"
|
||||||
|
|
||||||
#define BUILD 992
|
#define BUILD 993
|
||||||
|
|
||||||
#define HOSTID "mailarchiver"
|
#define HOSTID "mailarchiver"
|
||||||
|
|
||||||
|
@ -195,7 +195,9 @@ void handle_data(struct smtp_session *session, char *readbuf, int readlen, struc
|
|||||||
p += puflen;
|
p += puflen;
|
||||||
|
|
||||||
if(puflen > 0){
|
if(puflen > 0){
|
||||||
if(session->protocol_state == SMTP_STATE_DATA){
|
// pass the puffer to process_data() only if there was an '\n'
|
||||||
|
// on the line or the puffer does not start with a period
|
||||||
|
if(session->protocol_state == SMTP_STATE_DATA && (rc == OK || puf[0] != '.')){
|
||||||
process_data(session, puf, puflen);
|
process_data(session, puf, puflen);
|
||||||
}
|
}
|
||||||
else if(session->protocol_state == SMTP_STATE_BDAT){
|
else if(session->protocol_state == SMTP_STATE_BDAT){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user