Mercurial > pidgin.yaz
changeset 32024:2201ecdf0c45
Add the slpcall as a parameter when creating a slpmsg.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 09 May 2011 06:44:45 +0000 |
parents | dd83aa0bc5c0 |
children | c23778d56269 |
files | libpurple/protocols/msn/slplink.c libpurple/protocols/msn/slpmsg.c |
diffstat | 2 files changed, 8 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c Sat May 07 22:20:09 2011 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon May 09 06:44:45 2011 +0000 @@ -447,7 +447,7 @@ MsnSlpMessage *slpmsg; guint32 session_id; - slpmsg = msn_slpmsg_new(slplink); + slpmsg = msn_slpmsg_new(slplink, NULL); slpmsg->id = msn_p2p_info_get_id(info); session_id = msn_p2p_info_get_session_id(info); slpmsg->size = msn_p2p_info_get_total_size(info);
--- a/libpurple/protocols/msn/slpmsg.c Sat May 07 22:20:09 2011 +0000 +++ b/libpurple/protocols/msn/slpmsg.c Mon May 09 06:44:45 2011 +0000 @@ -34,7 +34,7 @@ **************************************************************************/ MsnSlpMessage * -msn_slpmsg_new(MsnSlpLink *slplink) +msn_slpmsg_new(MsnSlpLink *slplink, MsnSlpCall *slpcall) { MsnSlpMessage *slpmsg; @@ -47,6 +47,7 @@ msn_slpmsg_set_slplink(slpmsg, slplink); else slpmsg->slplink = NULL; + slpmsg->slpcall = slpcall; slpmsg->p2p_info = msn_p2p_info_new(MSN_P2P_VERSION_ONE); @@ -103,7 +104,6 @@ slplink->slp_msgs = g_list_append(slplink->slp_msgs, slpmsg); - } void @@ -188,11 +188,9 @@ g_strlcat(body, content, body_len); } - slpmsg = msn_slpmsg_new(slplink); + slpmsg = msn_slpmsg_new(slplink, slpcall); msn_slpmsg_set_body(slpmsg, body, body_len); - slpmsg->slpcall = slpcall; - g_free(body); return slpmsg; @@ -203,7 +201,7 @@ MsnSlpMessage *slpmsg; MsnP2PInfo *new_info; - slpmsg = msn_slpmsg_new(NULL); + slpmsg = msn_slpmsg_new(NULL, NULL); new_info = slpmsg->p2p_info; msn_p2p_info_create_ack(ack_info, new_info); @@ -217,8 +215,7 @@ { MsnSlpMessage *slpmsg; - slpmsg = msn_slpmsg_new(NULL); - slpmsg->slpcall = slpcall; + slpmsg = msn_slpmsg_new(NULL, slpcall); msn_p2p_info_set_flags(slpmsg->p2p_info, P2P_MSN_OBJ_DATA); slpmsg->info = "SLP DATA"; @@ -231,9 +228,8 @@ { MsnSlpMessage *slpmsg; - slpmsg = msn_slpmsg_new(NULL); + slpmsg = msn_slpmsg_new(NULL, slpcall); - slpmsg->slpcall = slpcall; msn_p2p_info_set_session_id(slpmsg->p2p_info, slpcall->session_id); msn_slpmsg_set_body(slpmsg, NULL, 4); slpmsg->info = "SLP DATA PREP"; @@ -246,9 +242,8 @@ { MsnSlpMessage *slpmsg; - slpmsg = msn_slpmsg_new(NULL); + slpmsg = msn_slpmsg_new(NULL, slpcall); - slpmsg->slpcall = slpcall; msn_p2p_info_set_flags(slpmsg->p2p_info, P2P_FILE_DATA); slpmsg->info = "SLP FILE"; slpmsg->size = size;