[gvfs] [FTP] close data connection before invoking error handlers
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Subject: [gvfs] [FTP] close data connection before invoking error handlers
- Date: Thu, 11 Jun 2009 05:21:28 -0400 (EDT)
commit b6637656b002baed39647d6b7c66d79d6bae4ed5
Author: Benjamin Otte <otte gnome org>
Date: Thu Jun 11 11:15:57 2009 +0200
[FTP] close data connection before invoking error handlers
Some ftp commands like RETR require an open data connection, but if they
fail, we want to invoke error handlers. To allow those handlers to open
data connections themselves, we close any potentially open ones beofre
invoking them.
---
daemon/gvfsftptask.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index 7ef998b..ac47964 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -560,6 +560,10 @@ g_vfs_ftp_task_send_and_check (GVfsFtpTask * task,
if (response == 550 && funcs)
{
+ /* close a potentially open data connection, the error handlers
+ * might try to open new ones and that would cause assertions */
+ g_vfs_ftp_task_close_data_connection (task);
+
while (*funcs && !g_vfs_ftp_task_is_in_error (task))
{
(*funcs) (task, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]