[Pkg-wmaker-commits] [wmbiff] 12/14: Imap fix from Rob Funk
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 02:59:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to tag wmbiff_0_3_1
in repository wmbiff.
commit 766a215e0d5a6d1fcb527c1803acd36ec92e5612
Author: oskuro <oskuro>
Date: Sat Jun 23 00:09:32 2001 +0000
Imap fix from Rob Funk
---
wmbiff/Imap4Client.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/wmbiff/Imap4Client.c b/wmbiff/Imap4Client.c
index d65be8a..0cc5866 100644
--- a/wmbiff/Imap4Client.c
+++ b/wmbiff/Imap4Client.c
@@ -1,4 +1,4 @@
-/* $Id: Imap4Client.c,v 1.3 2001/06/19 03:38:58 dwonis Exp $ */
+/* $Id: Imap4Client.c,v 1.4 2001/06/23 00:09:32 oskuro Exp $ */
/* Author : Yong-iL Joh ( tolkien at mizi.com )
Modified: Jorge Garc�a ( Jorge.Garcia at uv.es )
*
@@ -50,12 +50,34 @@ FILE *imap4Login(Pop3 pc)
int imap4CheckMail(Pop3 pc)
{
FILE *f;
+ char buf[BUF_SIZE];
f = pc->open(pc);
if (f == NULL)
return -1;
fflush(f);
+ fprintf(f, "a003 STATUS %s (MESSAGES UNSEEN)\r\n", pc->path);
+ fflush(f);
+ fgets(buf, 127, f);
+ if (buf[0] != '*') { /* Looking for "* STATUS ..." */
+ fprintf(stderr, "Error Receiving Stats '%s@%s:%d'\n\t%s\n",
+ PCU.userName, PCU.serverName, PCU.serverPort, buf);
+ fclose(f);
+ return -1;
+ } else {
+ sscanf(buf, "* STATUS %*s (MESSAGES %d UNSEEN %d)",
+ &(pc->TotalMsgs), &(pc->UnreadMsgs));
+#ifdef DEBUG_IMAP4
+ fprintf(stderr, "[%s:%d] %s", __FILE__, __LINE__, buf);
+#endif
+ fgets(buf, 127, f);
+#ifdef DEBUG_IMAP4
+ fprintf(stderr, "[%s:%d] %s", __FILE__, __LINE__, buf);
+#endif
+ }
+
+ fflush(f);
fprintf(f, "a004 LOGOUT\r\n");
fclose(f);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git
More information about the Pkg-wmaker-commits
mailing list