logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
case FTPSRVERR:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("Error in server greeting.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
case FTPLOGREFUSED:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("The server refuses login.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return FTPLOGREFUSED;
break;
case FTPLOGINC:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("Login incorrect.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return FTPLOGINC;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logprintf (LOG_NOTQUIET,
_("Unknown type `%c', closing control connection.\n"),
type_char);
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
case FTPOK:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, _("No such directory `%s'.\n\n"),
u->dir);
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
if (dtsock < 0)
{
int save_errno = errno;
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
logprintf (LOG_VERBOSE, _("couldn't connect to %s port %hu: %s\n"),
pretty_print_address (&passive_addr), passive_port,
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
case CONSOCKERR:
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, "socket: %s\n", strerror (errno));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, _("Bind error (%s).\n"),
strerror (errno));
- xclose (dtsock);
+ fd_close (dtsock);
return err;
break;
case FTPPORTERR:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("Invalid PORT.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logprintf (LOG_NOTQUIET,
_("\nREST failed; will not truncate `%s'.\n"),
con->target);
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return CONTNOTSUPPORTED;
}
request. */
if (opt.spider)
{
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return RETRFINISHED;
}
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
case FTPNSFOD:
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, _("No such file `%s'.\n\n"), u->file);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (dtsock);
+ fd_close (local_sock);
return err;
break;
case FTPOK:
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET, _("\
Error in server response, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logputs (LOG_NOTQUIET,
_("Write failed, closing control connection.\n"));
- xclose (csock);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (csock);
+ fd_close (dtsock);
+ fd_close (local_sock);
rbuf_uninitialize (&con->rbuf);
return err;
break;
logputs (LOG_VERBOSE, "\n");
logprintf (LOG_NOTQUIET, _("No such file or directory `%s'.\n\n"),
".");
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (dtsock);
+ fd_close (local_sock);
return err;
break;
case FTPOK:
if (!fp)
{
logprintf (LOG_NOTQUIET, "%s: %s\n", con->target, strerror (errno));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (dtsock);
+ fd_close (local_sock);
return FOPENERR;
}
}
tms = time_str (NULL);
tmrate = retr_rate (*len - restval, con->dltime, 0);
/* Close data connection socket. */
- xclose (dtsock);
- xclose (local_sock);
+ fd_close (dtsock);
+ fd_close (local_sock);
/* Close the local file. */
{
/* Close or flush the file. We have to be careful to check for
{
logprintf (LOG_NOTQUIET, _("%s: %s, closing control connection.\n"),
con->target, strerror (errno));
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return FWRITEERR;
}
return FTPRETRINT, since there is a possibility that the
whole file was retrieved nevertheless (but that is for
ftp_loop_internal to decide). */
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
return FTPRETRINT;
} /* err != FTPOK */
{
/* I should probably send 'QUIT' and check for a reply, but this
is faster. #### Is it OK, though? */
- xclose (csock);
+ fd_close (csock);
rbuf_uninitialize (&con->rbuf);
}
/* If it was a listing, and opt.server_response is true,
if (con->st & ON_YOUR_OWN)
{
- xclose (RBUF_FD (&con->rbuf));
+ fd_close (RBUF_FD (&con->rbuf));
rbuf_uninitialize (&con->rbuf);
}
if (!opt.spider)
if (rbuf_initialized_p (&con->rbuf) && (con->st & ON_YOUR_OWN))
{
- xclose (RBUF_FD (&con->rbuf));
+ fd_close (RBUF_FD (&con->rbuf));
rbuf_uninitialize (&con->rbuf);
}
return TRYLIMEXC;
*dt |= RETROKF;
/* If a connection was left, quench it. */
if (rbuf_initialized_p (&con.rbuf))
- xclose (RBUF_FD (&con.rbuf));
+ fd_close (RBUF_FD (&con.rbuf));
xfree_null (con.id);
con.id = NULL;
xfree_null (con.target);