Mercurial > hg > mlmmj
changeset 145:009b507618d2
Fixed interrupted fgets() in write_mailbody_from_file()
author | mortenp |
---|---|
date | Wed, 02 Jun 2004 22:34:07 +1000 |
parents | c5f63433fbca |
children | 5696f7e676ec |
files | ChangeLog src/mail-functions.c |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 02 16:26:57 2004 +1000 +++ b/ChangeLog Wed Jun 02 22:34:07 2004 +1000 @@ -1,3 +1,4 @@ + o Fixed interrupted fgets() in write_mailbody_from_file() o Fixed leak of subfile in mlmmj-send 0.5.2 o footer and customheaders are now accessed from listdir/control/ where
--- a/src/mail-functions.c Wed Jun 02 16:26:57 2004 +1000 +++ b/src/mail-functions.c Wed Jun 02 22:34:07 2004 +1000 @@ -121,7 +121,13 @@ /* keep writing chunks of line (max WRITE_BUFSIZE) */ for(;;) { bufp = buf+1; - if(!fgets(bufp, WRITE_BUFSIZE, infile)) break; + if(!fgets(bufp, WRITE_BUFSIZE, infile)) { + if (errno == EINTR) { + continue; + } else { + return errno; + } + } /* fix "dot lines" */ if(full_line && (bufp[0] == '.')) {