Mercurial > pidgin
changeset 30697:f3d2a46a5ea8
Attempt to simplify and clean
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 08 Feb 2010 08:26:12 +0000 |
parents | d22b9e73c929 |
children | 24f371e16a51 |
files | libpurple/protocols/msn/slplink.c |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c Mon Feb 08 08:18:20 2010 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon Feb 08 08:26:12 2010 +0000 @@ -497,7 +497,6 @@ const char *data; guint64 offset; gsize len; - PurpleXfer *xfer = NULL; if (purple_debug_is_verbose()) msn_slpmsg_show(msg); @@ -508,8 +507,11 @@ if (msg->msnslp_header.total_size < msg->msnslp_header.length) { - purple_debug_error("msn", "This can't be good\n"); - g_return_if_reached(); + /* We seem to have received a bad header */ + purple_debug_warning("msn", "Total size listed in SLP binary header " + "was less than length of this particular message. This " + "should not happen. Dropping message.\n"); + return; } data = msn_message_get_bin_data(msg, &len); @@ -534,7 +536,7 @@ if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000020 || slpmsg->flags == 0x1000030) { - xfer = slpmsg->slpcall->xfer; + PurpleXfer *xfer = slpmsg->slpcall->xfer; if (xfer != NULL) { slpmsg->ft = TRUE; @@ -578,10 +580,9 @@ if (slpmsg->ft) { - xfer = slpmsg->slpcall->xfer; slpmsg->slpcall->u.incoming_data = g_byte_array_append(slpmsg->slpcall->u.incoming_data, (const guchar *)data, len); - purple_xfer_prpl_ready(xfer); + purple_xfer_prpl_ready(slpmsg->slpcall->xfer); } else if (slpmsg->size && slpmsg->buffer) {