From 9dfe6e27554c4e9ba33949827433f475758d59f1 Mon Sep 17 00:00:00 2001 From: Jacek Masiulaniec Date: Sat, 12 Dec 2009 14:04:00 +0000 Subject: 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. --- usr.sbin/smtpd/mta.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.sbin/smtpd/mta.c') 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 @@ -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); -- cgit v1.2.3