diff src/protocols/jabber/jabber.c @ 6003:0ca618645cec

[gaim-migrate @ 6451] this fixes a couple jabber segfaults, and hopefully doesn't break anything. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 03 Jul 2003 18:27:22 +0000
parents b4a3628b7af2
children 3b4f94adc7d4
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Thu Jul 03 14:24:49 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Thu Jul 03 18:27:22 2003 +0000
@@ -139,7 +139,6 @@
 	gboolean did_import;
 	GSList *chats;
 	time_t idle;
-	gboolean die;
 	GHashTable *buddies;
 	GSList *file_transfers;
 };
@@ -675,8 +674,6 @@
 		gaim_debug(GAIM_DEBUG_MISC, "jabber",
 				   "input (len %d): %s\n", len, buf);
 		XML_Parse(gjc->parser, buf, len, 0);
-		if (jd->die)
-			gaim_connection_destroy(GJ_GC(gjc));
 	} else if (len < 0 || errno != EAGAIN) {
 		STATE_EVT(JCONN_STATE_OFF)
 	}
@@ -1938,8 +1935,6 @@
 		} else {
 			gaim_connection_error(GJ_GC(gjc), _("Unknown login error"));
 		}
-
-		jd->die = TRUE;
 	}
 }
 
@@ -4197,8 +4192,6 @@
 		} else {
 			gaim_connection_error(GJ_GC(gjc), _("Unknown registration error"));
 		}
-
-		jd->die = TRUE;
 	}
 }
 
@@ -4273,7 +4266,7 @@
  */
 void jabber_register_user(GaimAccount *account)
 {
-	GaimConnection *gc = gaim_account_get_connection(account);
+	GaimConnection *gc = gaim_connection_new(account);
 	struct jabber_data *jd = gc->proto_data = g_new0(struct jabber_data, 1);
 	char *loginname = create_valid_jid(account->username, DEFAULT_SERVER, "Gaim");