diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-06 02:43:59 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-06 02:43:59 +0000 |
commit | 9e528cc22428aabfba76fb6159044bfc8d0c9c09 (patch) | |
tree | f1125bd1c945956a6cfcbee442ebfef6b51e2b23 /usr.sbin/smtpd | |
parent | 2404c313585ee5ac34f440f9fea648e313a08d2f (diff) |
evbuffer_readline already strips <CRLF> so that callers don't have to.
ok gilles
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/mta.c | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 8998688914b..284914d80e0 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.9 2008/12/05 19:09:59 gilles Exp $ */ +/* $OpenBSD: mta.c,v 1.10 2008/12/06 02:43:58 jacekm Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -503,8 +503,6 @@ mta_reply_handler(struct bufferevent *bev, void *arg) return 0; } - line[strcspn(line, "\r")] = '\0'; - bufferevent_enable(bev, EV_READ|EV_WRITE); log_debug("remote server sent: [%s]", line); diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 174359fba90..74441cb3723 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.19 2008/12/05 17:29:11 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.20 2008/12/06 02:43:58 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -729,7 +729,6 @@ read: } if (s->s_state == S_DATACONTENT) { - line[strcspn(line, "\r")] = '\0'; /*log_debug("content: %s", line);*/ if (strcmp(line, ".") == 0) { s->s_state = S_DONE; @@ -776,7 +775,6 @@ read: goto read; } - line[strcspn(line, "\r")] = '\0'; if ((ep = strchr(line, ':')) == NULL) ep = strchr(line, ' '); if (ep != NULL) { |