diff src/protocols/oscar/email.c @ 7045:237ad253dd34

[gaim-migrate @ 7608] This should fix SimGuy's problem and maybe the problem Luke had earlier. I don't know what I was thinking with the static variables. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 30 Sep 2003 01:32:29 +0000
parents 4375bf2d9020
children 6d3d8f11e765
line wrap: on
line diff
--- a/src/protocols/oscar/email.c	Tue Sep 30 00:39:24 2003 +0000
+++ b/src/protocols/oscar/email.c	Tue Sep 30 01:32:29 2003 +0000
@@ -12,11 +12,6 @@
 #include <aim.h>
 
 /**
- * All info maintained by this family.
- */
-static struct aim_emailinfo *emailinfo = NULL;
-
-/**
  * Subtype 0x0006 - Request information about your email account
  *
  * @param sess The oscar session.
@@ -90,7 +85,7 @@
 	cookie16 = aimbs_getraw(bs, 16); /* Mail cookie sent above */
 
 	/* See if we already have some info associated with this cookie */
-	for (new=emailinfo; (new && strncmp(cookie16, new->cookie16, 16)); new=new->next);
+	for (new=sess->emailinfo; (new && strncmp(cookie16, new->cookie16, 16)); new=new->next);
 	if (new) {
 		/* Free some of the old info, if existant */
 		free(new->cookie8);
@@ -102,8 +97,8 @@
 		if (!(new = malloc(sizeof(struct aim_emailinfo))))
 			return -ENOMEM;
 		memset(new, 0, sizeof(struct aim_emailinfo));
-		new->next = emailinfo;
-		emailinfo = new;
+		new->next = sess->emailinfo;
+		sess->emailinfo = new;
 	}
 
 	new->cookie8 = cookie8;
@@ -182,9 +177,9 @@
 
 static void email_shutdown(aim_session_t *sess, aim_module_t *mod)
 {
-	while (emailinfo) {
-		struct aim_emailinfo *tmp = emailinfo;
-		emailinfo = emailinfo->next;
+	while (sess->emailinfo) {
+		struct aim_emailinfo *tmp = sess->emailinfo;
+		sess->emailinfo = sess->emailinfo->next;
 		free(tmp->cookie16);
 		free(tmp->cookie8);
 		free(tmp->url);