Mercurial > pidgin
annotate libpurple/protocols/msn/session.c @ 32816:071a0e568ac5
merge of '688484ce559f68e7d5e5ac8e67cc667f96c3791a'
and '9b2b55b0c80013fc7794f6334575fb6b7e9ed5b7'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Thu, 31 May 2012 06:20:22 +0000 |
parents | e10e419e6067 |
children |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file session.c MSN session functions |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15822 | 4 * purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
15822 | 6 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17579
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
30742
a99b6dcdb60d
Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents:
30741
diff
changeset
|
24 |
30758
230caecf5435
Include internal.h on each c file to avoid windows breakage as recommended by Daniel.
masca@cpw.pidgin.im
parents:
30742
diff
changeset
|
25 #include "internal.h" |
30742
a99b6dcdb60d
Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents:
30741
diff
changeset
|
26 #include "debug.h" |
a99b6dcdb60d
Remove unnecesary includes from msn.h.
masca@cpw.pidgin.im
parents:
30741
diff
changeset
|
27 |
30712
b3b7b537284f
msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents:
30684
diff
changeset
|
28 #include "error.h" |
30657
e30865b62859
Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27381
diff
changeset
|
29 #include "msnutils.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include "session.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 #include "notification.h" |
20534
7e69275a4eef
oim migrated to new soap code, quadruply duplicated message!
Ka-Hing Cheung <khc@hxbc.us>
parents:
20533
diff
changeset
|
32 #include "oim.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 MsnSession * |
15822 | 35 msn_session_new(PurpleAccount *account) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 MsnSession *session; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 g_return_val_if_fail(account != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 session = g_new0(MsnSession, 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 session->account = account; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 session->notification = msn_notification_new(session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 session->userlist = msn_userlist_new(session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 session->user = msn_user_new(session->userlist, |
15822 | 48 purple_account_get_username(account), NULL); |
31262
feb50c34ec46
Fix a memleak in the MSN prpl when removing a buddy from your buddy list.
Mark Doliner <mark@kingant.net>
parents:
31022
diff
changeset
|
49 msn_userlist_add_user(session->userlist, session->user); |
20534
7e69275a4eef
oim migrated to new soap code, quadruply duplicated message!
Ka-Hing Cheung <khc@hxbc.us>
parents:
20533
diff
changeset
|
50 session->oim = msn_oim_new(session); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 |
30658
ed838ad00173
Fix MSN protocol version detection to use the best version returned by the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30657
diff
changeset
|
52 session->protocol_ver = 0; |
31007
388ca4797d7b
Replace the mpop account setting with a session boolean, because I
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30987
diff
changeset
|
53 session->enable_mpop = TRUE; /* Default only */ |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 |
30657
e30865b62859
Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27381
diff
changeset
|
55 session->guid = rand_guid(); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 return session; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 msn_session_destroy(MsnSession *session) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
62 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 g_return_if_fail(session != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 session->destroying = TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 |
30317
ea96292336f0
Save and cancel-on-exit any URL requests, instead of checking the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30267
diff
changeset
|
67 while (session->url_datas) { |
ea96292336f0
Save and cancel-on-exit any URL requests, instead of checking the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30267
diff
changeset
|
68 purple_util_fetch_url_cancel(session->url_datas->data); |
ea96292336f0
Save and cancel-on-exit any URL requests, instead of checking the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30267
diff
changeset
|
69 session->url_datas = g_slist_delete_link(session->url_datas, session->url_datas); |
ea96292336f0
Save and cancel-on-exit any URL requests, instead of checking the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30267
diff
changeset
|
70 } |
ea96292336f0
Save and cancel-on-exit any URL requests, instead of checking the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30267
diff
changeset
|
71 |
23690
107166bb2a64
I guess I re-arranged a little off. We probably should disconnect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23676
diff
changeset
|
72 if (session->connected) |
107166bb2a64
I guess I re-arranged a little off. We probably should disconnect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23676
diff
changeset
|
73 msn_session_disconnect(session); |
107166bb2a64
I guess I re-arranged a little off. We probably should disconnect
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23676
diff
changeset
|
74 |
23676
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
75 if (session->soap_cleanup_handle) |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
76 purple_timeout_remove(session->soap_cleanup_handle); |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
77 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
78 if (session->soap_table != NULL) |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
79 g_hash_table_destroy(session->soap_table); |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
80 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
81 while (session->slplinks != NULL) |
30830
e935d15725c3
Hide msn_slplink_destroy and use the unref version everywhere.
masca@cpw.pidgin.im
parents:
30758
diff
changeset
|
82 msn_slplink_unref(session->slplinks->data); |
23676
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
83 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
84 while (session->switches != NULL) |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
85 msn_switchboard_destroy(session->switches->data); |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
86 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
87 if (session->oim != NULL) |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
88 msn_oim_destroy(session->oim); |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
89 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
90 if (session->nexus != NULL) |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
91 msn_nexus_destroy(session->nexus); |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
92 |
8552b19acbce
Re-arrange msn_session_destroy to avoid use-after-free bugs. I don't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23675
diff
changeset
|
93 if (session->user != NULL) |
30741
417899347f8a
Remove msn_user_destroy in favor of msn_user_unref.
masca@cpw.pidgin.im
parents:
30730
diff
changeset
|
94 msn_user_unref(session->user); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 if (session->notification != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 msn_notification_destroy(session->notification); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 msn_userlist_destroy(session->userlist); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 |
21791 | 101 g_free(session->psm); |
30657
e30865b62859
Initial support for msnp16, based on patch by Masca.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
27381
diff
changeset
|
102 g_free(session->guid); |
25458
b1080a1a2cb0
Save and use the CacheKey for ABCH SOAP requests.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25456
diff
changeset
|
103 g_free(session->abch_cachekey); |
25456
201789d2f003
Comment out this extra string until we need it (if ever).
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24755
diff
changeset
|
104 #if 0 |
23477
fd124c21ebb7
Properly parse (most of) the MSN GCF command. Provides a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23468
diff
changeset
|
105 g_free(session->blocked_text); |
25456
201789d2f003
Comment out this extra string until we need it (if ever).
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24755
diff
changeset
|
106 #endif |
23477
fd124c21ebb7
Properly parse (most of) the MSN GCF command. Provides a
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23468
diff
changeset
|
107 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
108 g_free(session->passport_info.sid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 g_free(session->passport_info.mspauth); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 g_free(session->passport_info.client_ip); |
23612
7f4b697c6947
Use a URL to open MSN Hotmail inbox instead of a temporary file.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23554
diff
changeset
|
111 g_free(session->passport_info.mail_url); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 g_free(session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
115 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
116 gboolean |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
117 msn_session_connect(MsnSession *session, const char *host, int port, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 gboolean http_method) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 g_return_val_if_fail(session != NULL, FALSE); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 g_return_val_if_fail(!session->connected, TRUE); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 session->connected = TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 session->http_method = http_method; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 if (session->notification == NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
127 { |
15822 | 128 purple_debug_error("msn", "This shouldn't happen\n"); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 g_return_val_if_reached(FALSE); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 |
24385
5b5c21b60690
Get rid of an unnecessary if statement, and don't try to unref a
Mark Doliner <mark@kingant.net>
parents:
23690
diff
changeset
|
132 return msn_notification_connect(session->notification, host, port); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 msn_session_disconnect(MsnSession *session) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 g_return_if_fail(session != NULL); |
20766
5beeb2e546c2
Prevent an assertion (w/ G_DEBUG=fatal_warnings) when the connection drops.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20589
diff
changeset
|
139 |
5beeb2e546c2
Prevent an assertion (w/ G_DEBUG=fatal_warnings) when the connection drops.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20589
diff
changeset
|
140 if (!session->connected) |
5beeb2e546c2
Prevent an assertion (w/ G_DEBUG=fatal_warnings) when the connection drops.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20589
diff
changeset
|
141 return; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 |
30267
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
143 if (session->login_timeout) { |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
144 purple_timeout_remove(session->login_timeout); |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
145 session->login_timeout = 0; |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
146 } |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
147 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 session->connected = FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 while (session->switches != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 msn_switchboard_close(session->switches->data); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 if (session->notification != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 msn_notification_close(session->notification); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 /* TODO: This must go away when conversation is redesigned */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
158 MsnSwitchBoard * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 msn_session_find_swboard(MsnSession *session, const char *username) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 g_return_val_if_fail(session != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
164 g_return_val_if_fail(username != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 for (l = session->switches; l != NULL; l = l->next) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
167 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 MsnSwitchBoard *swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
170 swboard = l->data; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
172 if ((swboard->im_user != NULL) && !strcmp(username, swboard->im_user)) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 return swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
174 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
175 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
177 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 |
20433
df8f443ae65f
use serv_got_im to report received oim's
Stu Tomlinson <stu@nosnilmot.com>
parents:
20432
diff
changeset
|
179 static PurpleConversation * |
20394
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
180 msn_session_get_conv(MsnSession *session,const char *passport) |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
181 { |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
182 PurpleAccount *account; |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
183 PurpleConversation * conv; |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
184 |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
185 g_return_val_if_fail(session != NULL, NULL); |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
186 account = session->account; |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
187 |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
188 conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
189 passport, account); |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
190 if(conv == NULL){ |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
191 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, passport); |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
192 } |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
193 return conv; |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
194 } |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
195 |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
196 /* put Message to User Conversation |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
197 * |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
198 * passport - the one want to talk to you |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
199 */ |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
200 void |
23490
fd276936164f
Make errors when sending OIM's more visible.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23477
diff
changeset
|
201 msn_session_report_user(MsnSession *session,const char *passport,const char *msg,PurpleMessageFlags flags) |
20394
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
202 { |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
203 PurpleConversation * conv; |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
204 |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
205 if ((conv = msn_session_get_conv(session,passport)) != NULL){ |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
206 purple_conversation_write(conv, NULL, msg, flags, time(NULL)); |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
207 } |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
208 } |
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
209 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 MsnSwitchBoard * |
15822 | 211 msn_session_find_swboard_with_conv(MsnSession *session, PurpleConversation *conv) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 g_return_val_if_fail(session != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 g_return_val_if_fail(conv != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 for (l = session->switches; l != NULL; l = l->next) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 MsnSwitchBoard *swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 swboard = l->data; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 if (swboard->conv == conv) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 return swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 MsnSwitchBoard * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 msn_session_find_swboard_with_id(const MsnSession *session, int chat_id) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 g_return_val_if_fail(session != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 g_return_val_if_fail(chat_id >= 0, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 for (l = session->switches; l != NULL; l = l->next) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 MsnSwitchBoard *swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 swboard = l->data; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 if (swboard->chat_id == chat_id) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 return swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 MsnSwitchBoard * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 msn_session_get_swboard(MsnSession *session, const char *username, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 MsnSBFlag flag) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
255 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
256 MsnSwitchBoard *swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
257 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
258 g_return_val_if_fail(session != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
259 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
260 swboard = msn_session_find_swboard(session, username); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
261 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 if (swboard == NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
263 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 swboard = msn_switchboard_new(session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 swboard->im_user = g_strdup(username); |
31791
6ce4f2272abc
Fix a crash when the account is disconnected and we have requested a SB. (Hanzz, ported by shlomif)(Fixes #12431)
masca@cpw.pidgin.im
parents:
31765
diff
changeset
|
266 if (msn_switchboard_request(swboard)) |
6ce4f2272abc
Fix a crash when the account is disconnected and we have requested a SB. (Hanzz, ported by shlomif)(Fixes #12431)
masca@cpw.pidgin.im
parents:
31765
diff
changeset
|
267 msn_switchboard_request_add_user(swboard, username); |
6ce4f2272abc
Fix a crash when the account is disconnected and we have requested a SB. (Hanzz, ported by shlomif)(Fixes #12431)
masca@cpw.pidgin.im
parents:
31765
diff
changeset
|
268 else |
6ce4f2272abc
Fix a crash when the account is disconnected and we have requested a SB. (Hanzz, ported by shlomif)(Fixes #12431)
masca@cpw.pidgin.im
parents:
31765
diff
changeset
|
269 return NULL; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
270 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
271 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 swboard->flag |= flag; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 return swboard; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 |
30267
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
277 static gboolean |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
278 msn_login_timeout_cb(gpointer data) |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
279 { |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
280 MsnSession *session = data; |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
281 /* This forces the login process to finish, even though we haven't heard |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
282 a response for our FQY requests yet. We'll at least end up online to the |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
283 people we've already added. The rest will follow later. */ |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
284 msn_session_finish_login(session); |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
285 session->login_timeout = 0; |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
286 return FALSE; |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
287 } |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
288 |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
289 void |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
290 msn_session_activate_login_timeout(MsnSession *session) |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
291 { |
30440
6c59e8ad1261
Fix a possible crash reported by HanzZ. Fix thanks to HanzZ also.
hanzz@soc.pidgin.im
parents:
30317
diff
changeset
|
292 if (!session->logged_in && session->connected) { |
31765
c164dcad5e28
Don't accidentally add a second login timeout. This shouldn't happen
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31262
diff
changeset
|
293 if (session->login_timeout) |
c164dcad5e28
Don't accidentally add a second login timeout. This shouldn't happen
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31262
diff
changeset
|
294 purple_timeout_remove(session->login_timeout); |
30267
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
295 session->login_timeout = |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
296 purple_timeout_add_seconds(MSN_LOGIN_FQY_TIMEOUT, |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
297 msn_login_timeout_cb, session); |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
298 } |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
299 } |
88a047f92c39
Add a timeout which forces the login process to complete. This won't
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
30265
diff
changeset
|
300 |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
301 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
302 msn_session_sync_users(MsnSession *session) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
303 { |
15822 | 304 PurpleConnection *gc = purple_account_get_connection(session->account); |
22927
25e4a0add118
Make MSN buddy list synchronization more forgiving, only ask about
Stu Tomlinson <stu@nosnilmot.com>
parents:
22043
diff
changeset
|
305 GList *to_remove = NULL; |
26994
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
306 GSList *buddies; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
307 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
308 g_return_if_fail(gc != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
309 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
310 /* The core used to use msn_add_buddy to add all buddies before |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
311 * being logged in. This no longer happens, so we manually iterate |
20589
5723dbc6212d
Clear the password consistently when we get a "Signed-On elsewhere" or a "Invalid Password" disconnection. Disconnection reason codes will take care of this in the core, but until then, this is ok. Fixes #3204.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20514
diff
changeset
|
312 * over the whole buddy list to identify sync issues. |
20394
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
313 */ |
26994
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
314 for (buddies = purple_find_buddies(session->account, NULL); buddies; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
315 buddies = g_slist_delete_link(buddies, buddies)) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
316 PurpleBuddy *buddy = buddies->data; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
317 const gchar *buddy_name = purple_buddy_get_name(buddy); |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
318 const gchar *group_name = purple_group_get_name(purple_buddy_get_group(buddy)); |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
319 MsnUser *remote_user; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
320 gboolean found = FALSE; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
321 |
26994
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
322 remote_user = msn_userlist_find_user(session->userlist, buddy_name); |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
323 if (remote_user && remote_user->list_op & MSN_LIST_FL_OP) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
324 GList *l; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
325 for (l = remote_user->group_ids; l; l = l->next) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
326 const char *name = msn_userlist_find_group_name(remote_user->userlist, l->data); |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
327 if (name && !g_ascii_strcasecmp(group_name, name)) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
328 found = TRUE; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
329 break; |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
330 } |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
331 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 |
26994
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
333 /* We don't care if they're in a different group, as long as they're on the |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
334 * list somewhere. If we check for the group, we cause pain, agony and |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
335 * suffering for people who decide to re-arrange their buddy list elsewhere. |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
336 */ |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
337 if (!found) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
338 if ((remote_user == NULL) || !(remote_user->list_op & MSN_LIST_FL_OP)) { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
339 /* The user is not on the server list */ |
30712
b3b7b537284f
msn: Merge dialog and error to get an unified msn_error api.
masca@cpw.pidgin.im
parents:
30684
diff
changeset
|
340 msn_error_sync_issue(session, buddy_name, group_name); |
26994
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
341 } else { |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
342 /* The user is not in that group on the server list */ |
1fcd09c34fee
Use purple_find_buddies() instead of iterating the buddy list.
Paul Aurich <paul@darkrain42.org>
parents:
26505
diff
changeset
|
343 to_remove = g_list_prepend(to_remove, buddy); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
345 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
346 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
347 } |
22927
25e4a0add118
Make MSN buddy list synchronization more forgiving, only ask about
Stu Tomlinson <stu@nosnilmot.com>
parents:
22043
diff
changeset
|
348 |
25e4a0add118
Make MSN buddy list synchronization more forgiving, only ask about
Stu Tomlinson <stu@nosnilmot.com>
parents:
22043
diff
changeset
|
349 if (to_remove != NULL) { |
25e4a0add118
Make MSN buddy list synchronization more forgiving, only ask about
Stu Tomlinson <stu@nosnilmot.com>
parents:
22043
diff
changeset
|
350 g_list_foreach(to_remove, (GFunc)purple_blist_remove_buddy, NULL); |
22929
09cab27cbe42
unleak (thanks sadrul!)
Stu Tomlinson <stu@nosnilmot.com>
parents:
22927
diff
changeset
|
351 g_list_free(to_remove); |
22927
25e4a0add118
Make MSN buddy list synchronization more forgiving, only ask about
Stu Tomlinson <stu@nosnilmot.com>
parents:
22043
diff
changeset
|
352 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
353 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 msn_session_set_error(MsnSession *session, MsnErrorType error, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
357 const char *info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
358 { |
15822 | 359 PurpleConnection *gc; |
21358 | 360 PurpleConnectionError reason; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
361 char *msg; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 |
23675
da592864cae2
Don't try to report a connection error if the MSN session is being
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23612
diff
changeset
|
363 if (session->destroying) |
da592864cae2
Don't try to report a connection error if the MSN session is being
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23612
diff
changeset
|
364 return; |
da592864cae2
Don't try to report a connection error if the MSN session is being
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23612
diff
changeset
|
365 |
15822 | 366 gc = purple_account_get_connection(session->account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 switch (error) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 case MSN_ERROR_SERVCONN: |
21358 | 371 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 msg = g_strdup(info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 case MSN_ERROR_UNSUPPORTED_PROTOCOL: |
21358 | 375 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
376 msg = g_strdup(_("Our protocol is not supported by the " |
27381
f541583e31bd
More uniformity among disconnect error messages
Mark Doliner <mark@kingant.net>
parents:
26994
diff
changeset
|
377 "server")); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
378 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
379 case MSN_ERROR_HTTP_MALFORMED: |
21358 | 380 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
27381
f541583e31bd
More uniformity among disconnect error messages
Mark Doliner <mark@kingant.net>
parents:
26994
diff
changeset
|
381 msg = g_strdup(_("Error parsing HTTP")); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
383 case MSN_ERROR_SIGN_OTHER: |
21358 | 384 reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE; |
27381
f541583e31bd
More uniformity among disconnect error messages
Mark Doliner <mark@kingant.net>
parents:
26994
diff
changeset
|
385 msg = g_strdup(_("You have signed on from another location")); |
20589
5723dbc6212d
Clear the password consistently when we get a "Signed-On elsewhere" or a "Invalid Password" disconnection. Disconnection reason codes will take care of this in the core, but until then, this is ok. Fixes #3204.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20514
diff
changeset
|
386 if (!purple_account_get_remember_password(session->account)) |
5723dbc6212d
Clear the password consistently when we get a "Signed-On elsewhere" or a "Invalid Password" disconnection. Disconnection reason codes will take care of this in the core, but until then, this is ok. Fixes #3204.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20514
diff
changeset
|
387 purple_account_set_password(session->account, NULL); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
389 case MSN_ERROR_SERV_UNAVAILABLE: |
21358 | 390 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
391 msg = g_strdup(_("The MSN servers are temporarily " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 "unavailable. Please wait and try " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
393 "again.")); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
394 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 case MSN_ERROR_SERV_DOWN: |
21358 | 396 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
397 msg = g_strdup(_("The MSN servers are going down " |
27381
f541583e31bd
More uniformity among disconnect error messages
Mark Doliner <mark@kingant.net>
parents:
26994
diff
changeset
|
398 "temporarily")); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
399 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
400 case MSN_ERROR_AUTH: |
21358 | 401 reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
402 msg = g_strdup_printf(_("Unable to authenticate: %s"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
403 (info == NULL ) ? |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
404 _("Unknown error") : info); |
30265
62ca462d0abc
Clear the password on an MSN account if saving is disabled and the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29775
diff
changeset
|
405 /* Clear the password if it isn't being saved */ |
62ca462d0abc
Clear the password on an MSN account if saving is disabled and the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29775
diff
changeset
|
406 if (!purple_account_get_remember_password(session->account)) |
62ca462d0abc
Clear the password on an MSN account if saving is disabled and the
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
29775
diff
changeset
|
407 purple_account_set_password(session->account, NULL); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
408 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
409 case MSN_ERROR_BAD_BLIST: |
21358 | 410 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 msg = g_strdup(_("Your MSN buddy list is temporarily " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
412 "unavailable. Please wait and try " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
413 "again.")); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
414 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
415 default: |
21358 | 416 reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; |
27381
f541583e31bd
More uniformity among disconnect error messages
Mark Doliner <mark@kingant.net>
parents:
26994
diff
changeset
|
417 msg = g_strdup(_("Unknown error")); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
418 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
419 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
420 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
421 msn_session_disconnect(session); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
422 |
31872
a5b556ac1de5
Rename purple_connection_error_reason to purple_connection_error
Mark Doliner <mark@kingant.net>
parents:
31791
diff
changeset
|
423 purple_connection_error(gc, reason, msg); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
424 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
425 g_free(msg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
426 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
427 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
428 static const char * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
429 get_login_step_text(MsnSession *session) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
430 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
431 const char *steps_text[] = { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
432 _("Connecting"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
433 _("Handshaking"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
434 _("Transferring"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
435 _("Handshaking"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
436 _("Starting authentication"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
437 _("Getting cookie"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
438 _("Authenticating"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
439 _("Sending cookie"), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
440 _("Retrieving buddy list") |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
441 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
442 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
443 return steps_text[session->login_step]; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
444 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
445 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
446 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
447 msn_session_set_login_step(MsnSession *session, MsnLoginStep step) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
448 { |
15822 | 449 PurpleConnection *gc; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
450 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
451 /* Prevent the connection progress going backwards, eg. if we get |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
452 * transferred several times during login */ |
29775
869dfdcea8a7
Don't bother updating the login progress if the step didn't change
Mark Doliner <mark@kingant.net>
parents:
27381
diff
changeset
|
453 if (session->login_step >= step) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
454 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
455 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
456 /* If we're already logged in, we're probably here because of a |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
457 * mid-session XFR from the notification server, so we don't want to |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
458 * popup the connection progress dialog */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
459 if (session->logged_in) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
460 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
461 |
32246
10e5000326a5
Convert code to use the purple_account accessor functions.
andrew.victor@mxit.com
parents:
31872
diff
changeset
|
462 gc = purple_account_get_connection(session->account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
463 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
464 session->login_step = step; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
465 |
15822 | 466 purple_connection_update_progress(gc, get_login_step_text(session), step, |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
467 MSN_LOGIN_STEPS); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
468 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
469 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
470 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
471 msn_session_finish_login(MsnSession *session) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
472 { |
15822 | 473 PurpleAccount *account; |
474 PurpleConnection *gc; | |
16390
4fc51a87ce42
Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
475 PurpleStoredImage *img; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
476 |
24755
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
477 if (!session->logged_in) { |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
478 account = session->account; |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
479 gc = purple_account_get_connection(account); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
480 |
24755
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
481 img = purple_buddy_icons_find_account_icon(session->account); |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
482 /* TODO: Do we really want to call this if img is NULL? */ |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
483 msn_user_set_buddy_icon(session->user, img); |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
484 if (img != NULL) |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
485 purple_imgstore_unref(img); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
486 |
24755
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
487 session->logged_in = TRUE; |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
488 purple_connection_set_state(gc, PURPLE_CONNECTED); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
489 |
24755
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
490 /* Sync users */ |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
491 msn_session_sync_users(session); |
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
492 } |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
493 |
32533
e091c8ea292e
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31791
diff
changeset
|
494 /* TODO: Send this when updating status instead? */ |
e091c8ea292e
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31791
diff
changeset
|
495 msn_notification_send_uux_endpointdata(session); |
e091c8ea292e
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31791
diff
changeset
|
496 msn_notification_send_uux_private_endpointdata(session); |
e091c8ea292e
Pluck all MSNP18 changes. This is pretty much to fix sending OIMs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31791
diff
changeset
|
497 |
24755
39bd04a550a4
Actually that last change did break regular login, but I don't feel like
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24753
diff
changeset
|
498 msn_change_status(session); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 } |
20394
4a099e4d0d09
propagate from branch 'im.pidgin.pidgin' (head 98b6b547b29ea1192b73cc4e1de1e674edef4328)
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
500 |