comparison libpurple/protocols/msn/notification.c @ 20410:522ade544156

propagate im.pidgin.pidgin to im.pidgin.cpw.khc.msnp14
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 06 May 2007 02:17:45 +0000
parents 6f986caeab59 2afea2b41cab
children 76e736b59aa4
comparison
equal deleted inserted replaced
20409:7c0a2ef88018 20410:522ade544156
1223 1223
1224 rru = cmd->params[1]; 1224 rru = cmd->params[1];
1225 url = cmd->params[2]; 1225 url = cmd->params[2];
1226 1226
1227 buf = g_strdup_printf("%s%lu%s", 1227 buf = g_strdup_printf("%s%lu%s",
1228 session->passport_info.mspauth, 1228 session->passport_info.mspauth ? session->passport_info.mspauth : "BOGUS",
1229 time(NULL) - session->passport_info.sl, 1229 time(NULL) - session->passport_info.sl,
1230 purple_connection_get_password(account->gc)); 1230 purple_connection_get_password(account->gc));
1231 1231
1232 cipher = purple_ciphers_find_cipher("md5"); 1232 cipher = purple_ciphers_find_cipher("md5");
1233 context = purple_cipher_context_new(cipher, NULL); 1233 context = purple_cipher_context_new(cipher, NULL);
1498 1498
1499 if (strcmp(msg->remote_user, "Hotmail")) 1499 if (strcmp(msg->remote_user, "Hotmail"))
1500 /* This isn't an official message. */ 1500 /* This isn't an official message. */
1501 return; 1501 return;
1502 1502
1503 if ((value = msn_message_get_attr(msg, "kv")) != NULL){ 1503 if ((value = msn_message_get_attr(msg, "kv")) != NULL)
1504 if (session->passport_info.kv != NULL) 1504 {
1505 g_free(session->passport_info.kv); 1505 g_free(session->passport_info.kv);
1506
1507 session->passport_info.kv = g_strdup(value); 1506 session->passport_info.kv = g_strdup(value);
1508 } 1507 }
1509 1508
1510 if ((value = msn_message_get_attr(msg, "sid")) != NULL){ 1509 if ((value = msn_message_get_attr(msg, "sid")) != NULL)
1511 if (session->passport_info.sid != NULL) 1510 {
1512 g_free(session->passport_info.sid); 1511 g_free(session->passport_info.sid);
1513
1514 session->passport_info.sid = g_strdup(value); 1512 session->passport_info.sid = g_strdup(value);
1515 } 1513 }
1516 1514
1517 if ((value = msn_message_get_attr(msg, "MSPAuth")) != NULL) 1515 if ((value = msn_message_get_attr(msg, "MSPAuth")) != NULL)
1518 { 1516 {
1519 if (session->passport_info.mspauth != NULL) 1517 g_free(session->passport_info.mspauth);
1520 g_free(session->passport_info.mspauth);
1521
1522 purple_debug_info("MaYuan","MSPAuth:%s\n",value);
1523 session->passport_info.mspauth = g_strdup(value); 1518 session->passport_info.mspauth = g_strdup(value);
1524 } 1519 }
1525 1520
1526 if ((value = msn_message_get_attr(msg, "ClientIP")) != NULL) 1521 if ((value = msn_message_get_attr(msg, "ClientIP")) != NULL)
1527 { 1522 {
1528 if (session->passport_info.client_ip != NULL) 1523 g_free(session->passport_info.client_ip);
1529 g_free(session->passport_info.client_ip);
1530
1531 session->passport_info.client_ip = g_strdup(value); 1524 session->passport_info.client_ip = g_strdup(value);
1532 } 1525 }
1533 1526
1534 if ((value = msn_message_get_attr(msg, "ClientPort")) != NULL) 1527 if ((value = msn_message_get_attr(msg, "ClientPort")) != NULL)
1535 { 1528 {
1712 (subject != NULL ? subject : ""), 1705 (subject != NULL ? subject : ""),
1713 (from != NULL ? from : ""), 1706 (from != NULL ? from : ""),
1714 msn_user_get_passport(session->user), 1707 msn_user_get_passport(session->user),
1715 session->passport_info.file, NULL, NULL); 1708 session->passport_info.file, NULL, NULL);
1716 1709
1717 if (from != NULL) 1710 g_free(from);
1718 g_free(from); 1711 g_free(subject);
1719
1720 if (subject != NULL)
1721 g_free(subject);
1722 1712
1723 g_hash_table_destroy(table); 1713 g_hash_table_destroy(table);
1724 } 1714 }
1725 1715
1726 static void 1716 static void