Mercurial > pidgin
comparison libpurple/protocols/msn/notification.c @ 30709:4d7dfeae29c6
msn: Delete msn_cmdproc_send since it just have duplicated code from
msn_transaction_new.
I have replaced any msn_cmdproc_send with a proper msn_transaction_new and
msn_cmdproc_send_trans combo.
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 10 Mar 2010 21:46:37 +0000 |
parents | c5a7516418c7 |
children | f7ee91763c6b |
comparison
equal
deleted
inserted
replaced
30708:9a86ddd0914e | 30709:4d7dfeae29c6 |
---|---|
91 static void | 91 static void |
92 connect_cb(MsnServConn *servconn) | 92 connect_cb(MsnServConn *servconn) |
93 { | 93 { |
94 MsnCmdProc *cmdproc; | 94 MsnCmdProc *cmdproc; |
95 MsnSession *session; | 95 MsnSession *session; |
96 MsnTransaction *trans; | |
96 PurpleAccount *account; | 97 PurpleAccount *account; |
97 GString *vers; | 98 GString *vers; |
98 const char *ver_str; | 99 const char *ver_str; |
99 int i; | 100 int i; |
100 | 101 |
116 else | 117 else |
117 msn_session_set_login_step(session, MSN_LOGIN_STEP_HANDSHAKE2); | 118 msn_session_set_login_step(session, MSN_LOGIN_STEP_HANDSHAKE2); |
118 | 119 |
119 /* Skip the initial space */ | 120 /* Skip the initial space */ |
120 ver_str = (vers->str + 1); | 121 ver_str = (vers->str + 1); |
121 msn_cmdproc_send(cmdproc, "VER", "%s", ver_str); | 122 trans = msn_transaction_new(cmdproc, "VER", "%s", ver_str); |
123 msn_cmdproc_send_trans(cmdproc, trans); | |
122 | 124 |
123 g_string_free(vers, TRUE); | 125 g_string_free(vers, TRUE); |
124 } | 126 } |
125 | 127 |
126 gboolean | 128 gboolean |
155 | 157 |
156 void | 158 void |
157 msn_got_login_params(MsnSession *session, const char *ticket, const char *response) | 159 msn_got_login_params(MsnSession *session, const char *ticket, const char *response) |
158 { | 160 { |
159 MsnCmdProc *cmdproc; | 161 MsnCmdProc *cmdproc; |
162 MsnTransaction *trans; | |
160 | 163 |
161 cmdproc = session->notification->cmdproc; | 164 cmdproc = session->notification->cmdproc; |
162 | 165 |
163 msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_END); | 166 msn_session_set_login_step(session, MSN_LOGIN_STEP_AUTH_END); |
164 | 167 |
165 if (session->protocol_ver >= 16) | 168 if (session->protocol_ver >= 16) |
166 msn_cmdproc_send(cmdproc, "USR", "SSO S %s %s %s", ticket, response, session->guid); | 169 trans = msn_transaction_new(cmdproc, "USR", "SSO S %s %s %s", ticket, response, session->guid); |
167 else | 170 else |
168 msn_cmdproc_send(cmdproc, "USR", "SSO S %s %s", ticket, response); | 171 trans = msn_transaction_new(cmdproc, "USR", "SSO S %s %s", ticket, response); |
172 | |
173 msn_cmdproc_send_trans(cmdproc, trans); | |
169 } | 174 } |
170 | 175 |
171 static void | 176 static void |
172 cvr_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 177 cvr_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
173 { | 178 { |
174 PurpleAccount *account; | 179 PurpleAccount *account; |
180 MsnTransaction *trans; | |
175 | 181 |
176 account = cmdproc->session->account; | 182 account = cmdproc->session->account; |
177 | 183 |
178 msn_cmdproc_send(cmdproc, "USR", "SSO I %s", purple_account_get_username(account)); | 184 trans = msn_transaction_new(cmdproc, "USR", "SSO I %s", purple_account_get_username(account)); |
185 msn_cmdproc_send_trans(cmdproc, trans); | |
179 } | 186 } |
180 | 187 |
181 static void | 188 static void |
182 usr_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 189 usr_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
183 { | 190 { |
233 | 240 |
234 static void | 241 static void |
235 ver_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 242 ver_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
236 { | 243 { |
237 MsnSession *session; | 244 MsnSession *session; |
245 MsnTransaction *trans; | |
238 PurpleAccount *account; | 246 PurpleAccount *account; |
239 gboolean protocol_supported = FALSE; | 247 gboolean protocol_supported = FALSE; |
240 int proto_ver; | 248 int proto_ver; |
241 size_t i; | 249 size_t i; |
242 | 250 |
269 * Windows Live Messenger 8.5 | 277 * Windows Live Messenger 8.5 |
270 * Notice :CVR String discriminate! | 278 * Notice :CVR String discriminate! |
271 * reference of http://www.microsoft.com/globaldev/reference/oslocversion.mspx | 279 * reference of http://www.microsoft.com/globaldev/reference/oslocversion.mspx |
272 * to see the Local ID | 280 * to see the Local ID |
273 */ | 281 */ |
274 msn_cmdproc_send(cmdproc, "CVR", | 282 trans = msn_transaction_new(cmdproc, "CVR", |
275 "0x0409 winnt 5.1 i386 MSNMSGR 8.5.1302 BC01 %s", | 283 "0x0409 winnt 5.1 i386 MSNMSGR 8.5.1302 BC01 %s", |
276 purple_account_get_username(account)); | 284 purple_account_get_username(account)); |
285 msn_cmdproc_send_trans(cmdproc, trans); | |
277 } | 286 } |
278 | 287 |
279 /************************************************************************** | 288 /************************************************************************** |
280 * Log out | 289 * Log out |
281 **************************************************************************/ | 290 **************************************************************************/ |