# HG changeset patch # User Elliott Sales de Andrade # Date 1260768260 0 # Node ID bffe098efca24eef1952b7244ce7923f18d462c0 # Parent 65a71af04b55c274630d2c13fed10ca58121acc7 Calling purple_xfer_start may actually cancel the transfer (if the file was deleted, for example), so don't continue to do stuff if it was. Refs #6523, but doesn't yet fix it. diff -r 65a71af04b55 -r bffe098efca2 libpurple/protocols/msn/slplink.c --- a/libpurple/protocols/msn/slplink.c Mon Dec 14 04:12:34 2009 +0000 +++ b/libpurple/protocols/msn/slplink.c Mon Dec 14 05:24:20 2009 +0000 @@ -141,9 +141,11 @@ g_return_val_if_fail(username != NULL, NULL); slplink = msn_session_find_slplink(session, username); + purple_debug_info("msn", "Hey, we got a slplink: %p\n", slplink); if (slplink == NULL) slplink = msn_slplink_new(session, username); + purple_debug_info("msn", "Hey, the slplink's really: %p\n", slplink); return slplink; } @@ -456,13 +458,19 @@ MsnSlpMessage *slpmsg; PurpleXfer *xfer; + xfer = (PurpleXfer *)slpcall->xfer; + purple_xfer_ref(xfer); + purple_xfer_start(xfer, -1, NULL, 0); + if (purple_xfer_get_status(xfer) != PURPLE_XFER_STATUS_STARTED) { + purple_xfer_unref(xfer); + return; + } + purple_xfer_unref(xfer); + slpmsg = msn_slpmsg_new(slpcall->slplink); slpmsg->slpcall = slpcall; slpmsg->flags = 0x1000030; slpmsg->info = "SLP FILE"; - - xfer = (PurpleXfer *)slpcall->xfer; - purple_xfer_start(slpcall->xfer, -1, NULL, 0); slpmsg->size = purple_xfer_get_size(xfer); msn_slplink_send_slpmsg(slpcall->slplink, slpmsg);