pidgin: 0e962c7a: Add the slpcall as a parameter when crea...

qulogic at pidgin.im qulogic at pidgin.im
Mon May 9 04:21:23 EDT 2011


----------------------------------------------------------------------
Revision: 0e962c7ad968d7fc4f22c34754a643fd377e502f
Parent:   d6053150b258c5c8b2ac60e091a7d0d1b2d9be1d
Author:   qulogic at pidgin.im
Date:     05/09/11 02:44:45
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0e962c7ad968d7fc4f22c34754a643fd377e502f

Changelog: 

Add the slpcall as a parameter when creating a slpmsg.

Changes against parent d6053150b258c5c8b2ac60e091a7d0d1b2d9be1d

  patched  libpurple/protocols/msn/slplink.c
  patched  libpurple/protocols/msn/slpmsg.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slplink.c	075df5ce5366359858dcca4c0eb2077ab01ec407
+++ libpurple/protocols/msn/slplink.c	34836b33c627b4f6db320e2ad6fe7b501b56b6bd
@@ -447,7 +447,7 @@ init_first_msg(MsnSlpLink *slplink, MsnP
 	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);
============================================================
--- libpurple/protocols/msn/slpmsg.c	15d695b4fb3b023f62bf70fcf3d9c35e77897168
+++ libpurple/protocols/msn/slpmsg.c	29bc2c6f5cd5f6a60f88da22cc9d75ba2528ad23
@@ -34,7 +34,7 @@ MsnSlpMessage *
  **************************************************************************/
 
 MsnSlpMessage *
-msn_slpmsg_new(MsnSlpLink *slplink)
+msn_slpmsg_new(MsnSlpLink *slplink, MsnSlpCall *slpcall)
 {
 	MsnSlpMessage *slpmsg;
 
@@ -47,6 +47,7 @@ msn_slpmsg_new(MsnSlpLink *slplink)
 		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 @@ msn_slpmsg_set_slplink(MsnSlpMessage *sl
 
 	slplink->slp_msgs =
 		g_list_append(slplink->slp_msgs, slpmsg);
-
 }
 
 void
@@ -188,11 +188,9 @@ msn_slpmsg_sip_new(MsnSlpCall *slpcall, 
 		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 *msn_slpmsg_ack_new(MsnP2P
 	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 *msn_slpmsg_obj_new(MsnSlp
 {
 	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 *msn_slpmsg_dataprep_new(M
 {
 	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 *msn_slpmsg_file_new(MsnSl
 {
 	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;


More information about the Commits mailing list