changeset 18614:784f98a1bc7f

merge of 'b8d63ebbffba2503d6e449e02a44a2eedcc41d85' and 'fd7ea41ed6cbadab8f0cb49200276a59211e8ae6'
author Mark Doliner <mark@kingant.net>
date Sun, 22 Jul 2007 08:54:12 +0000
parents 56886bde4535 (current diff) c5be17bbb6e4 (diff)
children 0ad0bdb0063b
files
diffstat 1 files changed, 18 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Sun Jul 22 08:33:49 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sun Jul 22 08:54:12 2007 +0000
@@ -1431,7 +1431,6 @@
 purple_parse_auth_securid_request_no_cb(gpointer user_data, const char *value)
 {
 	PurpleConnection *gc = user_data;
-	OscarData *od = gc->proto_data;
 
 	/* Disconnect */
 	gc->wants_to_die = TRUE;
@@ -3473,25 +3472,28 @@
 
 	if (conn->type == SNAC_FAMILY_CHAT) {
 		struct chat_connection *cc;
-		PurpleConversation *conv;
+		PurpleConversation *conv = NULL;
 
 		cc = find_oscar_chat_by_conn(gc, conn);
-		conv = purple_find_chat(gc, cc->id);
-
-		if (conv != NULL)
+		if (cc != NULL)
 		{
-			/*
-			 * TOOD: Have flap_connection_destroy_cb() send us the
-			 *       error message stored in 'tmp', which should be
-			 *       human-friendly, and print that to the chat room.
-			 */
-			gchar *buf;
-			buf = g_strdup_printf(_("You have been disconnected from chat "
-									"room %s."), cc->name);
-			purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_ERROR, time(NULL));
-			g_free(buf);
+			conv = purple_find_chat(gc, cc->id);
+
+			if (conv != NULL)
+			{
+				/*
+				 * TOOD: Have flap_connection_destroy_cb() send us the
+				 *       error message stored in 'tmp', which should be
+				 *       human-friendly, and print that to the chat room.
+				 */
+				gchar *buf;
+				buf = g_strdup_printf(_("You have been disconnected from chat "
+										"room %s."), cc->name);
+				purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_ERROR, time(NULL));
+				g_free(buf);
+			}
+			oscar_chat_kill(gc, cc);
 		}
-		oscar_chat_kill(gc, cc);
 	}
 
 	return 1;