Mercurial > pidgin
changeset 27064:175dd2627727
Add a msn_notification_post_rml analog.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 07 Jun 2009 06:47:49 +0000 |
parents | 4c651771840d |
children | caaeb149126d |
files | libpurple/protocols/msn/notification.c |
diffstat | 1 files changed, 14 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c Sun Jun 07 06:12:18 2009 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Jun 07 06:47:49 2009 +0000 @@ -557,6 +557,16 @@ msn_cmdproc_send_trans(cmdproc, trans); } +static void +msn_notification_post_rml(MsnCmdProc *cmdproc, const char *payload, int payload_len) +{ + MsnTransaction *trans; + purple_debug_info("msn", "Sending RML with payload: %s\n", payload); + trans = msn_transaction_new(cmdproc, "RML", "%i", payload_len); + msn_transaction_set_payload(trans, payload, payload_len); + msn_cmdproc_send_trans(cmdproc, trans); +} + void msn_notification_send_fqy(MsnSession *session, const char *payload, int payload_len, @@ -1981,11 +1991,10 @@ msn_add_contact_xml(notification->session, adl_node, user->passport, list_op, user->networkid); - payload = xmlnode_to_str(adl_node,&payload_len); + payload = xmlnode_to_str(adl_node, &payload_len); xmlnode_free(adl_node); - msn_notification_post_adl(notification->servconn->cmdproc, - payload,payload_len); + msn_notification_post_adl(cmdproc, payload, payload_len); g_free(payload); } @@ -1994,7 +2003,6 @@ MsnUser *user) { MsnCmdProc *cmdproc; - MsnTransaction *trans; MsnListOp list_op = 1 << list_id; xmlnode *rml_node; char *payload; @@ -2011,10 +2019,8 @@ payload = xmlnode_to_str(rml_node, &payload_len); xmlnode_free(rml_node); - purple_debug_info("msn", "Send RML with payload:\n%s\n", payload); - trans = msn_transaction_new(cmdproc, "RML","%" G_GSIZE_FORMAT, strlen(payload)); - msn_transaction_set_payload(trans, payload, strlen(payload)); - msn_cmdproc_send_trans(cmdproc, trans); + msn_notification_post_rml(cmdproc, payload, payload_len); + g_free(payload); }