changeset 30946:6cadf59c5835

This function isn't used and I've been trying to find the bug in it. So I guess it needs to go!
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Nov 2010 02:38:29 +0000
parents 18c5d3c482c7
children 0c60da8eb88c
files libpurple/protocols/msn/slpmsg.c libpurple/protocols/msn/slpmsg.h
diffstat 2 files changed, 0 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slpmsg.c	Mon Nov 22 00:01:39 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg.c	Mon Nov 22 02:38:29 2010 +0000
@@ -54,41 +54,6 @@
 	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)
 {
--- a/libpurple/protocols/msn/slpmsg.h	Mon Nov 22 00:01:39 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg.h	Mon Nov 22 02:38:29 2010 +0000
@@ -78,16 +78,6 @@
 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.