Mercurial > gftp.yaz
changeset 15:82fabd6ef1c4
FXP fixes (from Tobias Gruetzmacher <tobias@portfolio16.de>)
author | masneyb |
---|---|
date | Wed, 04 Sep 2002 13:02:15 +0000 |
parents | 83090328581e |
children | ddb983d8574b |
files | lib/rfc959.c |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/rfc959.c Wed Sep 04 11:45:56 2002 +0000 +++ b/lib/rfc959.c Wed Sep 04 13:02:15 2002 +0000 @@ -453,19 +453,28 @@ *endpos = '\0'; tempstr = g_strconcat ("PORT ", pos, "\r\n", NULL); + if (rfc959_send_command (toreq, tempstr) != '2') + { + g_free (tempstr); + return (-2); + } g_free (tempstr); - if (rfc959_send_command (toreq, tempstr) != '2') - return (-2); tempstr = g_strconcat ("RETR ", fromfile, "\r\n", NULL); + if (write_to_socket (fromreq, tempstr) < 0) + { + g_free (tempstr); + return (-2); + } g_free (tempstr); - if (write_to_socket (fromreq, tempstr) < 0) - return (-1); tempstr = g_strconcat ("STOR ", tofile, "\r\n", NULL); + if (write_to_socket (toreq, tempstr) < 0) + { + g_free (tempstr); + return (-2); + } g_free (tempstr); - if (write_to_socket (toreq, tempstr) < 0) - return (-1); if (rfc959_read_response (fromreq) < 0) return (-2);