On Tue, Mar 22, 2011 at 02:16:24AM -0400, Jared Yanovich wrote:
> On Mon, Mar 21, 2011 at 05:16:07PM +0000, Jacek Masiulaniec wrote:
> 
> > Code in client.c implements single SMTP conversation.  It doesn't
> > close the message body descriptor out of carefulness: in case of
> > extremely long MX records a single message body descriptor is re-used
> > instead of obtaining new ones from the queue process potentially
> > hundreds of times.
> 
> If you use fdopen(), you should have a corresponding fclose().  Perhaps dup()
> would be better here, along with responsibility of the issuer close()'ing the
> descriptor when the connection is done?
> 
> Or doing the fdopen() earlier and passing a FILE pointer around?

actually having the caller do the fdopen() and client API using the stdio
stream does not seem like a bad idea at all

Gilles

-- 
Gilles Chehade

                   http://www.poolp.org

Reply via email to