diff options
author | Kenneth G Raeburn <raeburn@mit.edu> | 1991-02-20 10:08:52 +0000 |
---|---|---|
committer | Kenneth G Raeburn <raeburn@mit.edu> | 1991-02-20 10:08:52 +0000 |
commit | b657bf43cee56c0f76968b5dae9704c865cc3d43 (patch) | |
tree | 528961fbf05a08f591e3aaaa73ce5cb35635e165 /clients/zmailnotify | |
parent | c39964cf666733c3ee1770c4937c66992630a744 (diff) |
From Mark Eichin:
Close pop connection as soon as possible; flush message bodies more
efficiently.
Diffstat (limited to 'clients/zmailnotify')
-rw-r--r-- | clients/zmailnotify/zmailnotify.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clients/zmailnotify/zmailnotify.c b/clients/zmailnotify/zmailnotify.c index ee86983..e7c753c 100644 --- a/clients/zmailnotify/zmailnotify.c +++ b/clients/zmailnotify/zmailnotify.c @@ -192,6 +192,10 @@ main() !strcmp(maillist[nmsgs-i].subj,mymail.subj))) break; } + + (void) pop_command("QUIT"); + pop_close(); + i++; for (;i<=nmsgs;i++) mail_notify(&maillist[nmsgs-i]); @@ -209,8 +213,6 @@ main() maillist[nmsgs-i].subj); (void) fclose(lock); - (void) pop_command("QUIT"); - pop_close(); exit(0); } @@ -531,6 +533,12 @@ FILE *f; } else { (void) strcpy(buf, buf+1); } + } else if (*buf == '\0') { + /* suck up all future lines, since this is after all only for headers */ + while(! ((buf[0]=='.') && (buf[1] == '\0')) ) { + if (getline(buf, n, f) != OK) return (NOTOK); + } + return DONE; } return(OK); } |