[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [gftp] RFE: auto-reconnect *on action* after time-out



Hello,

On Friday, September 12, 2003, at 03:56  PM, Anthony wrote:

I use SmartFTP on Windows, and one feature that I think is really obvious (and indispensable after you've used it for a while) is the ability to automatically reconnect to a server.

I don't mean that as soon as the connection times-out, gFTP should reconnect; of course that would be bad. But if you've been disconnected from a server, and then you try to transfer a file / get a dir listing / whatever, I think gFTP should automatically reconnect and perform the action. The result is that (aside from the slight delay, and aside from watching the log pane) the whole timeout/reconnection process becomes transparent to the user.
Ok. I take the example of downloading or uploading a file (src/gtk/transfer.c - transfer_window_files()):

if (!check_status (_("Transfer Files"), fromwdata, 1, 0, 1,
towdata->request->put_file != NULL && fromwdata->request->get_file != NULL))
return;

if (!GFTP_IS_CONNECTED (fromwdata->request) ||
!GFTP_IS_CONNECTED (towdata->request)) {
gui_window1->request->logging_function(gftp_logging_misc, NULL,
_("Retrieve Files: Not connected to a remote site\n"));
return;
}

if (check_reconnect (fromwdata) < 0 || check_reconnect (towdata) < 0)
return;

Brian - if I get gFTP into a directory, walk away such that it times out, then come back and press the download button, will it return due to the second statement, or correctly reconnect due to the third? I read that as saying "if you were never connected, return (should never happen), and if you've timed out, try to reconnect".''

Regards,
Nathan.

---------------------
Nathan Robertson
E-mail: nathanr@nathanr.net
Website: http://www.nathanr.net