]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2001-03-15 11:10:53 by ltoetsch]
authorltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 11:10:53 +0000 (11:10 +0000)
committerltoetsch <ltoetsch@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 11:10:53 +0000 (11:10 +0000)
added quit/logout to pop/imap

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

mail2.c

diff --git a/mail2.c b/mail2.c
index 19b80c3880759c2b4d172a61804a7c380bd95c66..4e974e5168ce3defcec0fd0ab41a16b0324f52d2 100644 (file)
--- a/mail2.c
+++ b/mail2.c
@@ -1,4 +1,4 @@
-/* $Id: mail2.c,v 1.1 2001/03/14 13:19:29 ltoetsch Exp $
+/* $Id: mail2.c,v 1.2 2001/03/15 11:10:53 ltoetsch Exp $
  *
  * mail: pop3, imap functions
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: mail2.c,v $
+ * Revision 1.2  2001/03/15 11:10:53  ltoetsch
+ * added quit/logout to pop/imap
+ *
  * Revision 1.1  2001/03/14 13:19:29  ltoetsch
  * Added pop3/imap4 mail support
  *
@@ -203,6 +206,8 @@ static int check_imap4(char *user, char *pass, char *machine,
     close(fd);
     return -1;
   }
+  strcpy(buf,". LOGOUT\r\n");
+  wr_rd(fd, buf, "", "LOGOUT", machine, port);
   close(fd);
   return 0;
 }
@@ -248,6 +253,8 @@ static int check_pop3(char *user, char *pass, char *machine,
     sscanf(buf, "+OK %d", unseen);
     *unseen = *total - *unseen;
   }
+  strcpy(buf, "QUIT\r\n");
+  wr_rd(fd, buf, "+OK", "Quit", machine, port);
   close(fd);
   return 0;
 }