diff src/protocols/oscar/oscar.c @ 3725:dd48b1ac5bd8

[gaim-migrate @ 3861] This is better because Duffman says so, oh yeah! No, but seriously... before these changes, if you got new email on an account, but didn't read it, gaim would pop up a little "read yo email, sucka!" notice every once in a while, because AIM sends you a little email status thing every once in a while. This should alleviate that problem (by attempting to keep track of the number of unread emails in your account). committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 17 Oct 2002 05:06:15 +0000
parents 5ab55c267294
children a20bf3d247ff
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Thu Oct 17 04:19:25 2002 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Oct 17 05:06:15 2002 +0000
@@ -2801,18 +2801,20 @@
 	va_list ap;
 	struct gaim_connection *gc = sess->aux_data;
 	struct aim_emailinfo *emailinfo;
+	int havenewmail;
 
 	va_start(ap, fr);
 	emailinfo = va_arg(ap, struct aim_emailinfo *);
+	havenewmail = va_arg(ap, int);
 	va_end(ap);
 
-	while (emailinfo) {
-		debug_printf("Got email info. webmail address for screenname@%s is %s,  new email: %hd,  number new: %d,  flag is %d\n", emailinfo->domain, emailinfo->url, emailinfo->unread, emailinfo->nummsgs, emailinfo->flag);
-		if (emailinfo->unread)
-			connection_has_mail(gc, emailinfo->nummsgs ? emailinfo->nummsgs : -1, NULL, NULL, emailinfo->url);
-		else
+	if (emailinfo) {
+		debug_printf("Got email info. webmail address for screenname@%s is %s,  new email: %hd,  number new: %d,  flag is %d, havenewmail is %d\n", emailinfo->domain, emailinfo->url, emailinfo->unread, emailinfo->nummsgs, emailinfo->flag, havenewmail);
+		if (emailinfo->unread) {
+			if (havenewmail)
+				connection_has_mail(gc, emailinfo->nummsgs ? emailinfo->nummsgs : -1, NULL, NULL, emailinfo->url);
+		} else
 			connection_has_mail(gc, 0, NULL, NULL, emailinfo->url);
-		emailinfo = emailinfo->next;
 	}
 
 	return 1;