From 790c554d43e996db3efe96a32eb1f59e876c3f91 Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Wed, 12 Sep 2001 05:58:16 +0000 Subject: [lcd4linux @ 2001-09-12 05:58:16 by reinelt] fixed bug in mail2.c --- mail2.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'mail2.c') diff --git a/mail2.c b/mail2.c index c26830f..4692a2c 100644 --- a/mail2.c +++ b/mail2.c @@ -1,4 +1,4 @@ -/* $Id: mail2.c,v 1.4 2001/03/16 09:28:08 ltoetsch Exp $ +/* $Id: mail2.c,v 1.5 2001/09/12 05:58:16 reinelt Exp $ * * mail: pop3, imap, news functions * @@ -20,6 +20,9 @@ * * * $Log: mail2.c,v $ + * Revision 1.5 2001/09/12 05:58:16 reinelt + * fixed bug in mail2.c + * * Revision 1.4 2001/03/16 09:28:08 ltoetsch * bugfixes * @@ -189,6 +192,9 @@ static int check_nntp(char *user, char *pass, char *machine, int totg, unsg; int first; + *total = 0; + *unseen = 0; + strcpy(buf, cfg_get("Newsrc") ?: ".newsrc"); if (*buf == 0 || ((fp = fopen(buf, "r")) == NULL)) { error("Couldn't open .newsrc-file '%s'", buf); @@ -293,6 +299,9 @@ static int check_imap4(char *user, char *pass, char *machine, char buf[BUFLEN]; char *p; + *total=0; + *unseen = 0; + if (fd < 0) { error("Couldn't connect to %s:%d (%s)", machine, port, strerror(errno)); @@ -337,6 +346,9 @@ static int check_pop3(char *user, char *pass, char *machine, int n; char buf[BUFLEN]; + *total=0; + *unseen=0; + if (fd < 0) { error("Couldn't connect to %s:%d (%s)", machine, port, strerror(errno)); -- cgit v1.2.3