From 50577c500cd3a4ed96e024383c720264b130b416 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Tue, 5 May 2009 17:42:23 +0200 Subject: Ensure the callbacks are only run once Also ensure that we get no progress callbacks after the transfer has been cancelled. --- libempathy/empathy-ft-handler.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libempathy/empathy-ft-handler.c') diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c index 6746f8127..b1861f6dd 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -419,6 +419,9 @@ ft_transfer_progress_callback (EmpathyTpFile *tp_file, EmpathyFTHandler *handler = user_data; EmpathyFTHandlerPriv *priv = GET_PRIV (handler); + if (empathy_ft_handler_is_cancelled (handler)) + return; + if (transferred_bytes == 0) { priv->last_update_time = empathy_time_get_current (); -- cgit v1.2.3