This is really, really good... I wonder if it can be combined with a macro or built into a macro so that the "if (ci_write) return -1" could be "ci_write" and since there's only ever one stream to write, "ci->tx" could be assumed.
The LMTP code doesn't use the ClientInfo structure, but in the process of refactoring the server code these sorts of micro-differences should be brought together so that the ClientInfo structure is either generic enough or beefy enough (just toss all of the different elements into it) to handle IMAP, POP, LMTP, and whatever else comes next (NNTP anyone? ;-) Aaron Paul J Stevens <[EMAIL PROTECTED]> said: > > Hi all, > > Since there were no takers, I did a follow-up on my earlier conclusion > that the networking code could do with some improvements. > > For those of you who haven't followed the list; dbmail2 won't work with > mozilla and derivatives. > > I've wrapped the code talking to clients in simple wrappers with error > checking, and lo; mozilla suddenly works just fine with dbmail2 :-) > > As a proof-of-concept I'm attaching my patch against the HEAD branch as > of today. > > This is not for inclusion in CVS just yet. It's still kind of rough, but > I wanted to share my relief that this really does appear to fix the bug. > Also, pop3.c and lmtpd.c would probably also benefit from this approach > as well. > > IMO imap4.c and friends could do with some re-indenting. Looks like > there are several different indent-styles intertwined in the code. Any > consensus on that regard ? > > > -- > ________________________________________________________________ > Paul Stevens mailto:[EMAIL PROTECTED] > NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED] > The Netherlands________________________________http://www.nfg.nl > > --
