Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
6639:1b91cb6be4c3 | 6640:314111e7b601 |
---|---|
473 | 473 |
474 if (dim->connected) | 474 if (dim->connected) |
475 g_snprintf(buf, sizeof buf, _("Direct IM with %s closed"), sn); | 475 g_snprintf(buf, sizeof buf, _("Direct IM with %s closed"), sn); |
476 else | 476 else |
477 g_snprintf(buf, sizeof buf, _("Direct IM with %s failed"), sn); | 477 g_snprintf(buf, sizeof buf, _("Direct IM with %s failed"), sn); |
478 | 478 |
479 if ((cnv = gaim_find_conversation(sn))) | 479 cnv = gaim_find_conversation_with_account(sn, gaim_connection_get_account(gc)); |
480 if (cnv) | |
480 gaim_conversation_write(cnv, NULL, buf, -1, GAIM_MESSAGE_SYSTEM, time(NULL)); | 481 gaim_conversation_write(cnv, NULL, buf, -1, GAIM_MESSAGE_SYSTEM, time(NULL)); |
481 | 482 |
482 gaim_conversation_update_progress(cnv, 0); | 483 gaim_conversation_update_progress(cnv, 0); |
483 | 484 |
484 g_free(dim); /* I guess? I don't see it anywhere else... -- mid */ | 485 g_free(dim); /* I guess? I don't see it anywhere else... -- mid */ |
1903 return; | 1904 return; |
1904 } | 1905 } |
1905 | 1906 |
1906 dim->conn->fd = source; | 1907 dim->conn->fd = source; |
1907 aim_conn_completeconnect(od->sess, dim->conn); | 1908 aim_conn_completeconnect(od->sess, dim->conn); |
1908 if (!(cnv = gaim_find_conversation(dim->name))) | 1909 cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, dim->name); |
1909 cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, dim->name); | |
1910 | 1910 |
1911 /* This is the best way to see if we're connected or not */ | 1911 /* This is the best way to see if we're connected or not */ |
1912 if (getpeername(source, &name, &name_len) == 0) { | 1912 if (getpeername(source, &name, &name_len) == 0) { |
1913 g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), dim->name); | 1913 g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), dim->name); |
1914 dim->connected = TRUE; | 1914 dim->connected = TRUE; |
5581 | 5581 |
5582 gaim_debug(GAIM_DEBUG_INFO, "oscar", | 5582 gaim_debug(GAIM_DEBUG_INFO, "oscar", |
5583 "DirectIM: initiate success to %s\n", sn); | 5583 "DirectIM: initiate success to %s\n", sn); |
5584 dim = find_direct_im(od, sn); | 5584 dim = find_direct_im(od, sn); |
5585 | 5585 |
5586 if (!(cnv = gaim_find_conversation(sn))) | 5586 cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, sn); |
5587 cnv = gaim_conversation_new(GAIM_CONV_IM, dim->gc->account, sn); | |
5588 gaim_input_remove(dim->watcher); | 5587 gaim_input_remove(dim->watcher); |
5589 dim->conn = newconn; | 5588 dim->conn = newconn; |
5590 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, oscar_callback, dim->conn); | 5589 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, oscar_callback, dim->conn); |
5591 dim->connected = TRUE; | 5590 dim->connected = TRUE; |
5592 g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), sn); | 5591 g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), sn); |
5620 gaim_input_remove(dim->watcher); /* Otherwise, the callback will callback */ | 5619 gaim_input_remove(dim->watcher); /* Otherwise, the callback will callback */ |
5621 dim->watcher = 0; | 5620 dim->watcher = 0; |
5622 } | 5621 } |
5623 while (gtk_events_pending()) | 5622 while (gtk_events_pending()) |
5624 gtk_main_iteration(); | 5623 gtk_main_iteration(); |
5625 | 5624 |
5626 if ((c = gaim_find_conversation(sn))) | 5625 gaim_conversation_update_progress(c, percent); |
5627 gaim_conversation_update_progress(c, percent); | |
5628 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, | 5626 dim->watcher = gaim_input_add(dim->conn->fd, GAIM_INPUT_READ, |
5629 oscar_callback, dim->conn); | 5627 oscar_callback, dim->conn); |
5630 | 5628 |
5631 return 1; | 5629 return 1; |
5632 } | 5630 } |