Changeset ef9ee0e for protocols/msn/ns.c
- Timestamp:
- 2015-05-31T02:40:05Z (9 years ago)
- Children:
- 899c8e8
- Parents:
- 4107fea
- git-author:
- dequis <dx@…> (19-04-15 06:06:25)
- git-committer:
- dequis <dx@…> (31-05-15 02:40:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/ns.c
r4107fea ref9ee0e 252 252 char *payload; 253 253 254 if (md->flags & MSN_DONE_BND) { 255 return 1; 256 } 257 258 md->flags |= MSN_DONE_BND; 259 260 // BND 254 261 payload = g_markup_printf_escaped( 255 262 "<msgr><ver>1</ver><client><name>Skype</name><ver>2/4.3.0.37/174</ver></client>" … … 262 269 263 270 } else if (strcmp(cmd[0], "BND") == 0) { 271 struct xt_node *node; 272 char *nonce, *resp, *payload; 273 274 if (!(xml = xt_from_string(msg + 2, msglen - 2)) || 275 !(node = xt_find_node(xml->children, "nonce")) || 276 !(nonce = node->text)) { 277 return 1; 278 } 279 280 resp = msn_p11_challenge(nonce); 281 282 // PUT MSGR\CHALLENGE 283 payload = g_markup_printf_escaped( 284 "<challenge><appId>%s</appId><response>%s</response></challenge>", 285 MSNP11_PROD_ID, resp); 286 287 msn_ns_write_cmd(ic, "PUT", "MSGR\\CHALLENGE", payload); 288 264 289 imcb_log(ic, "Authenticated, getting buddy list"); 265 290 msn_soap_memlist_request(ic); 291 292 xt_free_node(xml); 293 g_free(payload); 294 g_free(resp); 266 295 267 296 } else if (strcmp(cmd[0], "ADL") == 0) { … … 270 299 return msn_ns_finish_login(ic); 271 300 } 272 } else if (strcmp(cmd[0], "CHL") == 0) {273 char *resp;274 int st;275 276 if (num_parts < 3) {277 imcb_error(ic, "Syntax error");278 imc_logout(ic, TRUE);279 return(0);280 }281 282 resp = msn_p11_challenge(cmd[2]);283 284 st = msn_ns_write(ic, "QRY %d %s %zd\r\n%s",285 ++md->trId, MSNP11_PROD_ID,286 strlen(resp), resp);287 g_free(resp);288 return st;289 } else if (strcmp(cmd[0], "QRY") == 0) {290 /* CONGRATULATIONS */291 301 } else if (strcmp(cmd[0], "OUT") == 0) { 292 302 imcb_error(ic, "Session terminated by remote server (%s)", cmd[1] ? cmd[1] : "reason unknown");
Note: See TracChangeset
for help on using the changeset viewer.