# HG changeset patch # User Elliott Sales de Andrade # Date 1290393509 0 # Node ID 6cadf59c58352ca5df91e7e77e37d792fcf312bd # Parent 18c5d3c482c7a54d9f58b26f93a33276340eae5f This function isn't used and I've been trying to find the bug in it. So I guess it needs to go! diff -r 18c5d3c482c7 -r 6cadf59c5835 libpurple/protocols/msn/slpmsg.c --- 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) { diff -r 18c5d3c482c7 -r 6cadf59c5835 libpurple/protocols/msn/slpmsg.h --- 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.