From: <may...@us...> - 2006-08-27 11:45:16
|
Revision: 17057 Author: mayuan2006 Date: 2006-08-27 04:45:02 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=17057&view=rev Log Message: ----------- fix contact delete bug: when Send ADL,NS disconnect.<fix the add/delte XML format> committed by MaYuan<may...@gm...> Modified Paths: -------------- branches/soc-2006-msnp13/src/protocols/msn/README branches/soc-2006-msnp13/src/protocols/msn/contact.c branches/soc-2006-msnp13/src/protocols/msn/notification.c branches/soc-2006-msnp13/src/protocols/msn/userlist.c Modified: branches/soc-2006-msnp13/src/protocols/msn/README =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/README 2006-08-27 10:34:17 UTC (rev 17056) +++ branches/soc-2006-msnp13/src/protocols/msn/README 2006-08-27 11:45:02 UTC (rev 17057) @@ -30,8 +30,12 @@ * Windows Live ID authentication. * Offline Instant Message -Now can send and receive the Offline Instant Message. +Now can send and receive the Offline Instant Message to MSN user and Yahoo User. +*contact management +Can add/delete Contact +Can add/delete Group + * Communicate with Yahoo User Can send/receive Message/Nudge to Yahoo User. Modified: branches/soc-2006-msnp13/src/protocols/msn/contact.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/contact.c 2006-08-27 10:34:17 UTC (rev 17056) +++ branches/soc-2006-msnp13/src/protocols/msn/contact.c 2006-08-27 11:45:02 UTC (rev 17057) @@ -554,7 +554,7 @@ char *contact_xml = NULL ; MsnSoapReq *soap_request; - g_return_if_fail(contactId == NULL); + g_return_if_fail(contactId != NULL); gaim_debug_info("MaYuan","msn delete a contact,contactId:{%s}...\n",contactId); contact_xml = g_strdup_printf(MSN_CONTACTS_DEL_XML,contactId); body = g_strdup_printf(MSN_DEL_CONTACT_TEMPLATE,contact_xml); Modified: branches/soc-2006-msnp13/src/protocols/msn/notification.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/notification.c 2006-08-27 10:34:17 UTC (rev 17056) +++ branches/soc-2006-msnp13/src/protocols/msn/notification.c 2006-08-27 11:45:02 UTC (rev 17057) @@ -1739,15 +1739,17 @@ adl_node = xmlnode_new("ml"); adl_node->child = NULL; - xmlnode_set_attrib(adl_node, "l", "1"); - msn_add_contact_xml(adl_node,who,3,1); + msn_add_contact_xml(adl_node,who,1,1); payload = xmlnode_to_str(adl_node,&payload_len); xmlnode_free(adl_node); - - msn_notification_post_adl(notification->servconn->cmdproc, + if(msn_user_is_yahoo(notification->session->account,who)){ + msn_notification_fqy_yahoo(notification->session, who); + }else{ + msn_notification_post_adl(notification->servconn->cmdproc, payload,payload_len); + } } void @@ -1764,9 +1766,8 @@ rml_node = xmlnode_new("ml"); rml_node->child = NULL; - xmlnode_set_attrib(rml_node, "l", "1"); - msn_add_contact_xml(rml_node,who,3,1); + msn_add_contact_xml(rml_node,who,1,1); payload = xmlnode_to_str(rml_node,&payload_len); xmlnode_free(rml_node); Modified: branches/soc-2006-msnp13/src/protocols/msn/userlist.c =================================================================== --- branches/soc-2006-msnp13/src/protocols/msn/userlist.c 2006-08-27 10:34:17 UTC (rev 17056) +++ branches/soc-2006-msnp13/src/protocols/msn/userlist.c 2006-08-27 11:45:02 UTC (rev 17057) @@ -610,6 +610,8 @@ user = msn_userlist_find_user(userlist, who); + g_return_if_fail(user != NULL); + /*delete the contact from address book via soap action*/ msn_delete_contact(userlist->session->contact,user->uid); @@ -636,7 +638,7 @@ /* Then request the rem to the server. */ list = lists[list_id]; -// msn_notification_rem_buddy(userlist->session->notification, list, who, group_id); + msn_notification_rem_buddy(userlist->session->notification, list, who, group_id); } /*add buddy*/ @@ -693,7 +695,7 @@ gaim_debug_info("MaYuan", "add user:{%s} to group id {%s}\n",store_name ,group_id); msn_add_contact(userlist->session->contact,who,group_id); -#if 0 +#if 1 msn_notification_add_buddy(userlist->session->notification, list, who, store_name, group_id); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |