diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-12 14:04:00 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-12-12 14:04:00 +0000 |
commit | 9dfe6e27554c4e9ba33949827433f475758d59f1 (patch) | |
tree | 03fdbacb300cbac33848fe257e081297a144c613 /usr.sbin/smtpd/mta.c | |
parent | 32ca805073b05a555e12df3429094a6a0fd4d86d (diff) |
When acting as a client do content reads from the disk progressively
as the remote accepts more data instead of doing one big read into
the memory in the beginning of session.
Diffstat (limited to 'usr.sbin/smtpd/mta.c')
-rw-r--r-- | usr.sbin/smtpd/mta.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index 99ecc7ccd3f..660fd113afd 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.80 2009/12/12 10:33:11 jacekm Exp $ */ +/* $OpenBSD: mta.c,v 1.81 2009/12/12 14:03:59 jacekm Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -636,7 +636,7 @@ mta_enter_state(struct mta_session *s, int newstate, void *p) */ log_debug("mta: entering smtp phase"); - pcb = client_init(s->fd, s->env->sc_hostname, 1); + pcb = client_init(s->fd, s->datafd, s->env->sc_hostname, 1); /* lookup SSL certificate */ if (s->cert) { @@ -679,9 +679,6 @@ mta_enter_state(struct mta_session *s, int newstate, void *p) client_rcpt(pcb, m, "%s@%s", m->recipient.user, m->recipient.domain); - /* load message body */ - client_data_fd(pcb, s->datafd); - s->pcb = pcb; event_set(&s->ev, s->fd, EV_WRITE, mta_event, s); event_add(&s->ev, &pcb->timeout); |