annotate src/protocols/msn/nexus.c @ 19816:1aa5494587e8

[gaim-migrate @ 16973] change the soap process to below: Post one Soap request After finish one soap request,close the connection, If there are more, reconect and process it. to avoid the below problem: in one socket, If post soap request one by one, The second will always read 0 bytes. comitted by Ma Yuan<mayuan2006@gmail.com> committer: Ethan Blanton <elb@pidgin.im>
author Ma Yuan <mayuan2006@gmail.com>
date Tue, 22 Aug 2006 06:10:01 +0000
parents bffd1b96207c
children cb7433549a6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9198
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
1 /**
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
2 * @file nexus.c MSN Nexus functions
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
3 *
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
4 * gaim
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
5 *
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
8 * source distribution.
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
9 *
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
10 * This program is free software; you can redistribute it and/or modify
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
11 * it under the terms of the GNU General Public License as published by
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
13 * (at your option) any later version.
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
14 *
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
15 * This program is distributed in the hope that it will be useful,
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
18 * GNU General Public License for more details.
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
19 *
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
20 * You should have received a copy of the GNU General Public License
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
21 * along with this program; if not, write to the Free Software
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ab6636c5a136 [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
23 */
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #include "msn.h"
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
25 #include "soap.h"
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include "nexus.h"
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 #include "notification.h"
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
29 /*Local Function Prototype*/
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
30 static void nexus_login_connect_cb(gpointer data, GaimSslConnection *gsc,GaimInputCondition cond);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
31
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 /**************************************************************************
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
33 * Main
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
34 **************************************************************************/
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
35
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
36 MsnNexus *
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
37 msn_nexus_new(MsnSession *session)
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
38 {
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
39 MsnNexus *nexus;
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
40
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
41 nexus = g_new0(MsnNexus, 1);
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
42 nexus->session = session;
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
43 /*we must use SSL connection to do Windows Live ID authentication*/
19785
852b32710df0 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 19784
diff changeset
44 nexus->soapconn = msn_soap_new(session,nexus,1);
852b32710df0 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 19784
diff changeset
45
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
46 nexus->challenge_data = g_hash_table_new_full(g_str_hash,
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
47 g_str_equal, g_free, g_free);
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
48
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
49 return nexus;
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
50 }
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
51
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
52 void
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
53 msn_nexus_destroy(MsnNexus *nexus)
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
54 {
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
55 if (nexus->challenge_data != NULL)
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
56 g_hash_table_destroy(nexus->challenge_data);
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
57
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
58 msn_soap_destroy(nexus->soapconn);
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
59 g_free(nexus);
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
60 }
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
61
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
62 /**************************************************************************
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 * Login
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 **************************************************************************/
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 static void
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
66 nexus_login_error_cb(GaimSslConnection *gsc, GaimSslErrorType error, void *data)
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 {
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
68 MsnSoapConn * soapconn = data;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 MsnSession *session;
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
71 session = soapconn->session;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 g_return_if_fail(session != NULL);
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
74 msn_session_set_error(session, MSN_ERROR_AUTH, _("Windows Live ID authentication:Unable to connect"));
10568
fed2a7c2471d [gaim-migrate @ 11954]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10519
diff changeset
75 /* the above line will result in nexus being destroyed, so we don't want
fed2a7c2471d [gaim-migrate @ 11954]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10519
diff changeset
76 * to destroy it here, or we'd crash */
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 }
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
79 /*process the SOAP reply, get the Authentication Info*/
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 static void
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
81 nexus_login_read_cb(gpointer data, gint source, GaimInputCondition cond)
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
82 {
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
83 MsnSoapConn * soapconn = data;
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
84 MsnNexus *nexus;
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
85 MsnSession *session;
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
86
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
87 char *base, *c;
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
88 char *msn_twn_t,*msn_twn_p;
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
89 char *login_params;
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
90 char **elems, **cur, **tokens;
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
91 char * cert_str;
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
92
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
93 nexus = soapconn->parent;
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
94 g_return_if_fail(nexus != NULL);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
95 session = nexus->session;
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
96 g_return_if_fail(session != NULL);
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
97
19786
23258253c7a0 [gaim-migrate @ 16546]
Ma Yuan <mayuan2006@gmail.com>
parents: 19785
diff changeset
98 // gaim_debug_misc("msn", "TWN Server Reply: {%s}\n", soapconn->read_buf);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
99
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
100 /*reply OK, we should process the SOAP body*/
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
101 gaim_debug_info("MaYuan","Windows Live ID Reply OK!\n");
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
102
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
103 //TODO: we should parse it using XML
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
104 base = g_strstr_len(soapconn->read_buf, soapconn->read_len, TWN_START_TOKEN);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
105 base += strlen(TWN_START_TOKEN);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
106 c = g_strstr_len(soapconn->read_buf, soapconn->read_len, TWN_END_TOKEN);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
107 login_params = g_strndup(base, c - base);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
108
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
109 // gaim_debug_info("msn", "TWN Cert: {%s}\n", login_params);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
110
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
111 /* Parse the challenge data. */
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
112 elems = g_strsplit(login_params, "&amp;", 0);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
113
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
114 for (cur = elems; *cur != NULL; cur++){
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
115 tokens = g_strsplit(*cur, "=", 2);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
116 g_hash_table_insert(nexus->challenge_data, tokens[0], tokens[1]);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
117 /* Don't free each of the tokens, only the array. */
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
118 g_free(tokens);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
119 }
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
120
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
121 g_strfreev(elems);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
122
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
123 msn_twn_t = (char *)g_hash_table_lookup(nexus->challenge_data, "t");
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
124 msn_twn_p = (char *)g_hash_table_lookup(nexus->challenge_data, "p");
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
125
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
126 /*setup the t and p parameter for session*/
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
127 if (session->passport_info.t != NULL){
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
128 g_free(session->passport_info.t);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
129 }
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
130 session->passport_info.t = g_strdup(msn_twn_t);
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
131
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
132 if (session->passport_info.p != NULL)
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
133 g_free(session->passport_info.p);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
134 session->passport_info.p = g_strdup(msn_twn_p);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
135
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
136 cert_str = g_strdup_printf("t=%s&p=%s",msn_twn_t,msn_twn_p);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
137 msn_got_login_params(session, cert_str);
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
138
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
139 gaim_debug_info("MaYuan","close nexus connection! \n");
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
140 g_free(cert_str);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
141 g_free(login_params);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
142 msn_nexus_destroy(nexus);
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
143 session->nexus = NULL;
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
144
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
145 return;
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
146 }
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
147
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
148 static void
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
149 nexus_login_written_cb(gpointer data, gint source, GaimInputCondition cond)
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
150 {
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
151 MsnSoapConn * soapconn = data;
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
152
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
153 soapconn->read_cb = nexus_login_read_cb;
19810
da1075366756 [gaim-migrate @ 16885]
Ma Yuan <mayuan2006@gmail.com>
parents: 19808
diff changeset
154 // msn_soap_read_cb(data,source,cond);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
155 }
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
156
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
157
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
158 /*when connect, do the SOAP Style windows Live ID authentication */
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
159 void
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
160 nexus_login_connect_cb(gpointer data, GaimSslConnection *gsc,
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 GaimInputCondition cond)
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162 {
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
163 MsnSoapConn *soapconn;
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
164 MsnNexus * nexus;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 MsnSession *session;
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
166 char *ru,*lc,*id,*tw,*ct,*kpp,*kv,*ver,*rn,*tpf;
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
167 char *fs0,*fs;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 char *username, *password;
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
169 char *request_str, *head, *tail,*challenge_str;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
171 gaim_debug_info("MaYuan","starting Windows Live ID authentication\n");
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
172
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
173 soapconn = data;
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
174 g_return_if_fail(soapconn != NULL);
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
175
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
176 nexus = soapconn->parent;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 g_return_if_fail(nexus != NULL);
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
179 session = soapconn->session;
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 g_return_if_fail(session != NULL);
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181
10519
bec9130b24d2 [gaim-migrate @ 11833]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10504
diff changeset
182 msn_session_set_login_step(session, MSN_LOGIN_STEP_GET_COOKIE);
10481
bcfea6c3d5c9 [gaim-migrate @ 11769]
Stu Tomlinson <stu@nosnilmot.com>
parents: 10345
diff changeset
183
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
184 /*prepare the Windows Live ID authentication token*/
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
185 username = g_strdup(gaim_account_get_username(session->account));
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
186 password = g_strdup(gaim_connection_get_password(session->account->gc));
12457
e585695bc16b [gaim-migrate @ 14766]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
187
19808
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
188 lc = (char *)g_hash_table_lookup(nexus->challenge_data, "lc");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
189 id = (char *)g_hash_table_lookup(nexus->challenge_data, "id");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
190 tw = (char *)g_hash_table_lookup(nexus->challenge_data, "tw");
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
191 fs0= (char *)g_hash_table_lookup(nexus->challenge_data, "fs");
19808
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
192 ru = (char *)g_hash_table_lookup(nexus->challenge_data, "ru");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
193 ct = (char *)g_hash_table_lookup(nexus->challenge_data, "ct");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
194 kpp= (char *)g_hash_table_lookup(nexus->challenge_data, "kpp");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
195 kv = (char *)g_hash_table_lookup(nexus->challenge_data, "kv");
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
196 ver= (char *)g_hash_table_lookup(nexus->challenge_data, "ver");
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
197 rn = (char *)g_hash_table_lookup(nexus->challenge_data, "rn");
19808
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
198 tpf= (char *)g_hash_table_lookup(nexus->challenge_data, "tpf");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
199
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
200 /*
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
201 * add some fail-safe code to avoid windows Gaim Crash bug #1540454
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
202 * If any of these string is NULL, will return Authentication Fail!
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
203 * for when windows g_strdup_printf() implementation get NULL point,It crashed!
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
204 */
19808
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
205 if(!(lc && id && tw && ru && ct && kpp && kv && ver && tpf)){
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
206 gaim_debug_error("MaYuan","WLM Authenticate Key Error!\n");
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
207 msn_session_set_error(session, MSN_ERROR_AUTH, _("Windows Live ID authentication Failed"));
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
208 g_free(username);
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
209 g_free(password);
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
210 gaim_ssl_close(gsc);
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
211 msn_nexus_destroy(nexus);
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
212 session->nexus = NULL;
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
213 return;
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
214 }
75ecc42d3e8d [gaim-migrate @ 16882]
Ma Yuan <mayuan2006@gmail.com>
parents: 19806
diff changeset
215
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
216 /*
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
217 * in old MSN NS server's "USR TWN S" return,didn't include fs string
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
218 * so we use a default "1" for fs.
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
219 */
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
220 if(fs0){
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
221 fs = g_strdup(fs0);
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
222 }else{
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
223 fs = g_strdup("1");
19812
d928bccffe4c [gaim-migrate @ 16952]
Ma Yuan <mayuan2006@gmail.com>
parents: 19810
diff changeset
224 }
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
225 challenge_str = g_strdup_printf(
19812
d928bccffe4c [gaim-migrate @ 16952]
Ma Yuan <mayuan2006@gmail.com>
parents: 19810
diff changeset
226 "lc=%s&amp;id=%s&amp;tw=%s&amp;fs=%s&amp;ru=%s&amp;ct=%s&amp;kpp=%s&amp;kv=%s&amp;ver=%s&amp;rn=%s&amp;tpf=%s\r\n",
d928bccffe4c [gaim-migrate @ 16952]
Ma Yuan <mayuan2006@gmail.com>
parents: 19810
diff changeset
227 lc,id,tw,fs,ru,ct,kpp,kv,ver,rn,tpf
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
228 );
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
229 g_free(fs);
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
230
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
231 /*build the SOAP windows Live ID XML body */
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
232 tail = g_strdup_printf(TWN_ENVELOP_TEMPLATE,username,password,challenge_str );
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
234 soapconn->login_path = g_strdup(TWN_POST_URL);
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
235 head = g_strdup_printf(
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
236 "POST %s HTTP/1.1\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
237 "Accept: text/*\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
238 "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
239 "Host: %s\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
240 "Content-Length: %d\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
241 "Connection: Keep-Alive\r\n"
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
242 "Cache-Control: no-cache\r\n\r\n",
19815
bffd1b96207c [gaim-migrate @ 16968]
Ma Yuan <mayuan2006@gmail.com>
parents: 19813
diff changeset
243 soapconn->login_path,soapconn->login_host,(int)strlen(tail));
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
244
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
245 request_str = g_strdup_printf("%s%s", head,tail);
19786
23258253c7a0 [gaim-migrate @ 16546]
Ma Yuan <mayuan2006@gmail.com>
parents: 19785
diff changeset
246 // gaim_debug_misc("msn", "TWN Sending: {%s}\n", request_str);
12457
e585695bc16b [gaim-migrate @ 14766]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
247
e585695bc16b [gaim-migrate @ 14766]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
248 g_free(head);
e585695bc16b [gaim-migrate @ 14766]
Mark Doliner <mark@kingant.net>
parents: 10740
diff changeset
249 g_free(tail);
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250 g_free(username);
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 g_free(password);
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
253 /*prepare to send the SOAP request*/
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
254 msn_soap_write(soapconn,request_str,nexus_login_written_cb);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
255
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
256 return;
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
257 }
8171
d0ba2f7b40e7 [gaim-migrate @ 8884]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
259 /**************************************************************************
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
260 * Connect
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
261 **************************************************************************/
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
262 void
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
263 msn_nexus_connect(MsnNexus *nexus)
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
264 {
19783
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
265 /* Authenticate via Windows Live ID. */
995aea35b05c [gaim-migrate @ 16329]
Ma Yuan <mayuan2006@gmail.com>
parents: 13200
diff changeset
266 gaim_debug_info("MaYuan","msn_nexus_connect...\n");
19789
7e36832172a9 [gaim-migrate @ 16601]
Ma Yuan <mayuan2006@gmail.com>
parents: 19786
diff changeset
267 msn_soap_init(nexus->soapconn,MSN_TWN_SERVER,1,nexus_login_connect_cb,nexus_login_error_cb);
19806
cabf9165c9ce [gaim-migrate @ 16873]
Ma Yuan <mayuan2006@gmail.com>
parents: 19789
diff changeset
268 msn_soap_connect(nexus->soapconn);
13200
33bef17125c2 [gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 12457
diff changeset
269 }
19784
bc30c6270d9f [gaim-migrate @ 16473]
Ma Yuan <mayuan2006@gmail.com>
parents: 19783
diff changeset
270