changeset 2033:705783e5ab8c

[gaim-migrate @ 2043] fixes committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 16 Jun 2001 03:18:00 +0000
parents cfb9cf4655e6
children 6bdf9954097c
files src/oscar.c src/toc.c
diffstat 2 files changed, 14 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/oscar.c	Sat Jun 16 03:10:07 2001 +0000
+++ b/src/oscar.c	Sat Jun 16 03:18:00 2001 +0000
@@ -3148,24 +3148,25 @@
 static void oscar_do_action(struct gaim_connection *gc, char *act)
 {
 	struct oscar_data *od = gc->proto_data;
+	struct aim_conn_t *conn = aim_getconn_type(od->sess, AIM_CONN_TYPE_AUTH);
 
 	if (!strcmp(act, "Set User Info")) {
 		show_set_info(gc);
 	} else if (!strcmp(act, "Change Password")) {
 		show_change_passwd(gc);
 	} else if (!strcmp(act, "Confirm Account")) {
-		if (od->paspa == 0) {
+		if (!conn) {
 			od->conf = TRUE;
 			aim_bos_reqservice(od->sess, od->conn, AIM_CONN_TYPE_AUTH);
 		} else
-			aim_auth_reqconfirm(od->sess, aim_getconn_type(od->sess, AIM_CONN_TYPE_AUTH));
+			aim_auth_reqconfirm(od->sess, conn);
 	} else if (!strcmp(act, "Change Email")) {
 	} else if (!strcmp(act, "Display Current Registered Address")) {
-		if (od->paspa == 0) {
+		if (!conn) {
 			od->reqemail = TRUE;
 			aim_bos_reqservice(od->sess, od->conn, AIM_CONN_TYPE_AUTH);
 		} else
-			aim_auth_getinfo(od->sess, aim_getconn_type(od->sess, AIM_CONN_TYPE_AUTH), 0x11);
+			aim_auth_getinfo(od->sess, conn, 0x11);
 	} else if (!strcmp(act, "Search for Buddy by Email")) {
 		show_find_email(gc);
 	}
@@ -3192,7 +3193,7 @@
 static void oscar_change_passwd(struct gaim_connection *gc, char *old, char *new)
 {
 	struct oscar_data *od = gc->proto_data;
-	if (od->paspa == 0) {
+	if (!aim_getconn_type(od->sess, AIM_CONN_TYPE_AUTH)) {
 		od->chpass = TRUE;
 		od->oldp = g_strdup(old);
 		od->newp = g_strdup(new);
--- a/src/toc.c	Sat Jun 16 03:10:07 2001 +0000
+++ b/src/toc.c	Sat Jun 16 03:18:00 2001 +0000
@@ -165,9 +165,16 @@
 static void toc_login_callback(gpointer data, gint source, GdkInputCondition cond)
 {
 	struct gaim_connection *gc = data;
-	struct toc_data *tdt = gc->proto_data;
+	struct toc_data *tdt;
 	char buf[80];
 
+	if (!g_slist_find(connections, data)) {
+		close(source);
+		return;
+	}
+
+	tdt = gc->proto_data;
+
 	if (source == -1) {
 		/* we didn't successfully connect. tdt->toc_fd is valid here */
 		hide_login_progress(gc, "Unable to connect.");