Make _fetch_connect() always set the error code.
Tell ftp that _fetch_connect() always sets the error code (http already knew)
This commit is contained in:
parent
117f87fe9f
commit
40cfbfd508
@ -271,8 +271,10 @@ _fetch_connect(const char *host, int port, int af, int verbose)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((conn = _fetch_reopen(sd)) == NULL)
|
||||
if ((conn = _fetch_reopen(sd)) == NULL) {
|
||||
_fetch_syserr();
|
||||
close(sd);
|
||||
}
|
||||
return (conn);
|
||||
}
|
||||
|
||||
|
@ -796,10 +796,9 @@ _ftp_connect(struct url *url, struct url *purl, const char *flags)
|
||||
}
|
||||
|
||||
/* check connection */
|
||||
if (conn == NULL) {
|
||||
_fetch_syserr();
|
||||
if (conn == NULL)
|
||||
/* _fetch_connect() has already set an error code */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* expect welcome message */
|
||||
if ((e = _ftp_chkerr(conn)) != FTP_SERVICE_READY)
|
||||
|
Loading…
Reference in New Issue
Block a user