]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2001-09-12 05:58:16 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 12 Sep 2001 05:58:16 +0000 (05:58 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Wed, 12 Sep 2001 05:58:16 +0000 (05:58 +0000)
fixed bug in mail2.c

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@148 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

mail.c
mail2.c
socket.c

diff --git a/mail.c b/mail.c
index 3e90e3cfd0348fa699f49e8368ec4936ec49342f..7f1f2c686dd3cb2e827ea61a876945d018102790 100644 (file)
--- a/mail.c
+++ b/mail.c
@@ -1,4 +1,4 @@
-/* $Id: mail.c,v 1.10 2001/09/12 05:37:22 reinelt Exp $
+/* $Id: mail.c,v 1.11 2001/09/12 05:58:16 reinelt Exp $
  *
  * email specific functions
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: mail.c,v $
+ * Revision 1.11  2001/09/12 05:58:16  reinelt
+ * fixed bug in mail2.c
+ *
  * Revision 1.10  2001/09/12 05:37:22  reinelt
  *
  * fixed a bug in seti.c (file was never closed, lcd4linux run out of fd's
@@ -92,11 +95,11 @@ int Mail (int index, int *num, int *unseen)
 {
   FILE *fstr;
   char buffer[32];
-  static int cfgmbx[MAILBOXES+1]={[0 ... MAILBOXES]=TRUE,}; // Mailbox #index configured?
-  static time_t mbxlt[MAILBOXES+1]={[0 ... MAILBOXES]=0,};  // mtime of Mailbox #index
-  static int mbxnum[MAILBOXES+1]={[0 ... MAILBOXES]=0,};    // Last calculated # of mails
-  static time_t now[MAILBOXES+1]={[0 ... MAILBOXES]=0,};    // Last call to procedure at 
-                                                            // for Mailbox #index
+  static int   cfgmbx[MAILBOXES+1]={[0 ... MAILBOXES]=TRUE,}; // Mailbox #index configured?
+  static time_t mbxlt[MAILBOXES+1]={[0 ... MAILBOXES]=0,};    // mtime of Mailbox #index
+  static int   mbxnum[MAILBOXES+1]={[0 ... MAILBOXES]=0,};    // Last calculated # of mails
+  static time_t   now[MAILBOXES+1]={[0 ... MAILBOXES]=0,};    // Last call to procedure at 
+                                                              // for Mailbox #index
   char *fnp1;
   int v1=0;
   int last_line_blank1;                   // Was the last line blank?
diff --git a/mail2.c b/mail2.c
index c26830fab7890f85b88ea17d5ecdf6dfed215802..4692a2c222bd2dea3fdc61dfd1fcdc74e3ec86e6 100644 (file)
--- 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));
index ca57f95e075d1e0a6709ee8511d2547138636216..1e70342b57c2990da974d873def319d910582d06 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -1,4 +1,4 @@
-/* $Id: socket.c,v 1.3 2001/09/12 05:37:22 reinelt Exp $
+/* $Id: socket.c,v 1.4 2001/09/12 05:58:16 reinelt Exp $
  *
  * simple socket functions
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: socket.c,v $
+ * Revision 1.4  2001/09/12 05:58:16  reinelt
+ * fixed bug in mail2.c
+ *
  * Revision 1.3  2001/09/12 05:37:22  reinelt
  *
  * fixed a bug in seti.c (file was never closed, lcd4linux run out of fd's
@@ -84,7 +87,7 @@
 
 static char *quotemeta (char *string)
 {
-  char buffer[256];
+  static char buffer[256];
   char *s, *p;
 
   p=buffer;