pidgin: 9bb29a1c: This function isn't used and I've been t...

qulogic at pidgin.im qulogic at pidgin.im
Sun Nov 21 22:10:58 EST 2010


----------------------------------------------------------------------
Revision: 9bb29a1cd8ca54c0d833778f0c3263e76cae4ab6
Parent:   d444c843db4eab2415c8ca21b9f3d7d23d866ceb
Author:   qulogic at pidgin.im
Date:     11/21/10 21:38:29
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/9bb29a1cd8ca54c0d833778f0c3263e76cae4ab6

Changelog: 

This function isn't used and I've been trying to find the bug in it.
So I guess it needs to go!

Changes against parent d444c843db4eab2415c8ca21b9f3d7d23d866ceb

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

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slpmsg.c	fcd40b2bf43dbd607409779481fd65bfe87dabd1
+++ libpurple/protocols/msn/slpmsg.c	29f272610a711e8d79f546116027d3ed2b48b1c3
@@ -54,41 +54,6 @@ msn_slpmsg_new(MsnSlpLink *slplink)
 	return slpmsg;
 }
 
-MsnSlpMessage *msn_slpmsg_new_from_data(const char *data, size_t data_len)
-{
-	MsnSlpMessage *slpmsg;
-	MsnP2PHeader *header;
-	const char *tmp;
-	int body_len;
-
-	if (data_len < sizeof(*header)) {
-		return NULL;
-	}
-
-	tmp = data;
-	slpmsg = msn_slpmsg_new(NULL);
-
-	/* Extract the binary SLP header */
-	slpmsg->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp);
-
-	/* Extract the body */
-	body_len = data_len - (tmp - data);
-	/* msg->body_len = msg->msnslp_header.length; */
-
-	if (body_len > 0) {
-		slpmsg->size = body_len;
-		slpmsg->buffer = g_malloc(body_len);
-		memcpy(slpmsg->buffer, tmp, body_len);
-		tmp += body_len;
-	}
-
-	/* Extract the footer */
-	if (body_len >= 0) 
-		slpmsg->footer = msn_p2p_footer_from_wire((MsnP2PFooter*)tmp);
-
-	return slpmsg;
-}
-
 void
 msn_slpmsg_destroy(MsnSlpMessage *slpmsg)
 {
============================================================
--- libpurple/protocols/msn/slpmsg.h	f640070fe3ecffc4644b481cc738668bc4e19b60
+++ libpurple/protocols/msn/slpmsg.h	07d256f352a07d73ddc510d64819035e52c9e40b
@@ -78,16 +78,6 @@ MsnSlpMessage *msn_slpmsg_new(MsnSlpLink
 MsnSlpMessage *msn_slpmsg_new(MsnSlpLink *slplink);
 
 /**
- * Creates a MsnSlpMessage without a MsnSlpLink by parsing the raw data.
- *
- * @param data 		The raw data with the slp message.
- * @param data_len 	The len of the data
- *
- * @return The createed slp message.
- */
-MsnSlpMessage *msn_slpmsg_new_from_data(const char *data, size_t data_len);
-
-/**
  * Destroys a slp message
  *
  * @param slpmsg The slp message to destory.


More information about the Commits mailing list