# HG changeset patch # User masneyb # Date 1031144535 0 # Node ID 82fabd6ef1c4b5272db0c4bdc0f158036f0c1219 # Parent 83090328581edd57e74cbd8e0c44fc2cc9971eed FXP fixes (from Tobias Gruetzmacher ) diff -r 83090328581e -r 82fabd6ef1c4 lib/rfc959.c --- 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);