pidgin: 6d3a0b29: Add a msn_notification_post_rml analog.
qulogic at pidgin.im
qulogic at pidgin.im
Sun Jun 7 04:10:48 EDT 2009
-----------------------------------------------------------------
Revision: 6d3a0b29b22baeedf393b76044dde689caef3b45
Ancestor: a7bd74cbe46498f1390a4d33cce115bdd123a68d
Author: qulogic at pidgin.im
Date: 2009-06-07T06:47:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6d3a0b29b22baeedf393b76044dde689caef3b45
Modified files:
libpurple/protocols/msn/notification.c
ChangeLog:
Add a msn_notification_post_rml analog.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c 1d788aff6b47615484fadfa4fb5d3955077e6999
+++ libpurple/protocols/msn/notification.c 8f5d430cd7c59d9978c56a4fa406441ee0d19e86
@@ -557,6 +557,16 @@ msn_notification_post_adl(MsnCmdProc *cm
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_notification_add_buddy_to_list(MsnNo
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 @@ msn_notification_rem_buddy_from_list(Msn
MsnUser *user)
{
MsnCmdProc *cmdproc;
- MsnTransaction *trans;
MsnListOp list_op = 1 << list_id;
xmlnode *rml_node;
char *payload;
@@ -2011,10 +2019,8 @@ msn_notification_rem_buddy_from_list(Msn
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);
}
More information about the Commits
mailing list