diff src/protocols/oscar/oscar.c @ 6640:314111e7b601

[gaim-migrate @ 7165] Changed several calls from gaim_find_conversation() to gaim_find_conversation_with_account(). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 28 Aug 2003 01:18:50 +0000
parents 156e6643f9db
children 0c5637b5462e
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Wed Aug 27 23:03:03 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Aug 28 01:18:50 2003 +0000
@@ -475,8 +475,9 @@
 		g_snprintf(buf, sizeof buf, _("Direct IM with %s closed"), sn);
 	else 
 		g_snprintf(buf, sizeof buf, _("Direct IM with %s failed"), sn);
-		
-	if ((cnv = gaim_find_conversation(sn)))
+
+	cnv = gaim_find_conversation_with_account(sn, gaim_connection_get_account(gc));
+	if (cnv)
 		gaim_conversation_write(cnv, NULL, buf, -1, GAIM_MESSAGE_SYSTEM, time(NULL));
 
 	gaim_conversation_update_progress(cnv, 0);
@@ -1905,8 +1906,7 @@
 
 	dim->conn->fd = source;
 	aim_conn_completeconnect(od->sess, dim->conn);
-	if (!(cnv = gaim_find_conversation(dim->name)))
-		cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, dim->name);
+	cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, dim->name);
 
 	/* This is the best way to see if we're connected or not */
 	if (getpeername(source, &name, &name_len) == 0) {
@@ -5583,8 +5583,7 @@
 			   "DirectIM: initiate success to %s\n", sn);
 	dim = find_direct_im(od, sn);
 
-	if (!(cnv = gaim_find_conversation(sn)))
-		cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, sn);
+	cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, sn);
 	gaim_input_remove(dim->watcher);
 	dim->conn = newconn;
 	dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, oscar_callback, dim->conn);
@@ -5622,9 +5621,8 @@
 	}
 	while (gtk_events_pending())
 		gtk_main_iteration();
-	
-	if ((c = gaim_find_conversation(sn)))
-		gaim_conversation_update_progress(c, percent);
+
+	gaim_conversation_update_progress(c, percent);
 	dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ,
 				      oscar_callback, dim->conn);