# HG changeset patch # User Elliott Sales de Andrade # Date 1261549404 0 # Node ID 742ae16831fa48fe001b1d7fdf7bd4effe444a9c # Parent 5c4323a2f2b0ef40b8d018d4254b283d38ceadae Call purple_xfer_cancel_local instead of purple_xfer_request_denied when a file send is cancelled due to invalid files or the user cancelling the file selection dialog. I think this makes more sense, since there is no request to deny. It fixes a crash on exit with Bonjour where it attempts to cancel a non-existent PurpleXfer since it doesn't expect request-denied to be called for a send, and holds on to the pointer after it's destroyed. I think this may have affected some other prpls like the Telepathy ones, too. diff -r 5c4323a2f2b0 -r 742ae16831fa ChangeLog.API --- a/ChangeLog.API Wed Dec 23 05:57:45 2009 +0000 +++ b/ChangeLog.API Wed Dec 23 06:23:24 2009 +0000 @@ -1,6 +1,12 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul version 2.6.5 (??/??/20??): + libpurple: + Changed: + * purple_xfer_cancel_local is now called instead of + purple_xfer_request_denied if an error is found when selecting + a file to send. Request denied is still used when a receive + request is not allowed. version 2.6.4 (11/29/2009): No changes diff -r 5c4323a2f2b0 -r 742ae16831fa libpurple/ft.c --- a/libpurple/ft.c Wed Dec 23 05:57:45 2009 +0000 +++ b/libpurple/ft.c Wed Dec 23 06:23:24 2009 +0000 @@ -312,7 +312,7 @@ } else { purple_xfer_show_file_error(xfer, filename); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } } else if ((type == PURPLE_XFER_SEND) && (st.st_size == 0)) { @@ -320,7 +320,7 @@ purple_notify_error(NULL, NULL, _("Cannot send a file of 0 bytes."), NULL); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } else if ((type == PURPLE_XFER_SEND) && S_ISDIR(st.st_mode)) { /* @@ -329,7 +329,7 @@ purple_notify_error(NULL, NULL, _("Cannot send a directory."), NULL); - purple_xfer_request_denied(xfer); + purple_xfer_cancel_local(xfer); } else if ((type == PURPLE_XFER_RECEIVE) && S_ISDIR(st.st_mode)) { char *msg, *utf8; @@ -371,7 +371,10 @@ PurpleXfer *xfer = (PurpleXfer *)user_data; purple_xfer_set_status(xfer, PURPLE_XFER_STATUS_CANCEL_LOCAL); - purple_xfer_request_denied(xfer); + if (purple_xfer_get_type(xfer) == PURPLE_XFER_SEND) + purple_xfer_cancel_local(xfer); + else + purple_xfer_request_denied(xfer); purple_xfer_unref(xfer); }