Mercurial > gftp.yaz
comparison lib/rfc959.c @ 36:bc9473ba9a90
2002-10-07 Brian Masney <masneyb@gftp.org>
* lib/local.c - fixed file uploads
* lib/rfc959.c - fixed crash if you uploaded/downloaded a file that
you didn't have permission to
* src/gtk/transfer.c - display fixes for hostname
* autogen.sh - pass -c to automake
author | masneyb |
---|---|
date | Tue, 08 Oct 2002 02:19:46 +0000 |
parents | c8ec7877432e |
children | 66c064fd05bc |
comparison
equal
deleted
inserted
replaced
35:9d73b3cf05a6 | 36:bc9473ba9a90 |
---|---|
335 ret = rfc959_send_command (request, tempstr); | 335 ret = rfc959_send_command (request, tempstr); |
336 g_free (tempstr); | 336 g_free (tempstr); |
337 | 337 |
338 if (ret != '1') | 338 if (ret != '1') |
339 { | 339 { |
340 fclose (request->datafd); | 340 if (request->datafd != NULL) |
341 request->datafd = NULL; | 341 { |
342 fclose (request->datafd); | |
343 request->datafd = NULL; | |
344 } | |
342 return (-2); | 345 return (-2); |
343 } | 346 } |
344 | 347 |
345 if (request->transfer_type == gftp_transfer_active && | 348 if (request->transfer_type == gftp_transfer_active && |
346 (ret = rfc959_accept_active_connection (request)) < 0) | 349 (ret = rfc959_accept_active_connection (request)) < 0) |
406 tempstr = g_strconcat ("STOR ", filename, "\r\n", NULL); | 409 tempstr = g_strconcat ("STOR ", filename, "\r\n", NULL); |
407 ret = rfc959_send_command (request, tempstr); | 410 ret = rfc959_send_command (request, tempstr); |
408 g_free (tempstr); | 411 g_free (tempstr); |
409 if (ret != '1') | 412 if (ret != '1') |
410 { | 413 { |
411 fclose (request->datafd); | 414 if (request->datafd != NULL) |
412 request->datafd = NULL; | 415 { |
416 fclose (request->datafd); | |
417 request->datafd = NULL; | |
418 } | |
413 return (-2); | 419 return (-2); |
414 } | 420 } |
415 | 421 |
416 if (request->transfer_type == gftp_transfer_active && | 422 if (request->transfer_type == gftp_transfer_active && |
417 (ret = rfc959_accept_active_connection (request)) < 0) | 423 (ret = rfc959_accept_active_connection (request)) < 0) |