mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Fixed a few compile errors and warnings.
This commit is contained in:
parent
5ce3eb066e
commit
7831c1ae44
19
lib/ftp.c
19
lib/ftp.c
@ -220,7 +220,7 @@ const struct Curl_handler Curl_handler_ftp_proxy = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
/*
|
/*
|
||||||
* HTTP-proxyed FTPS protocol handler.
|
* HTTP-proxyed FTPS protocol handler.
|
||||||
*/
|
*/
|
||||||
@ -240,7 +240,7 @@ const struct Curl_handler Curl_handler_ftps_proxy = {
|
|||||||
PORT_FTPS, /* defport */
|
PORT_FTPS, /* defport */
|
||||||
PROT_HTTP /* protocol */
|
PROT_HTTP /* protocol */
|
||||||
};
|
};
|
||||||
# endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -4109,10 +4109,17 @@ static CURLcode Curl_ftp_setup_connection(struct connectdata * conn)
|
|||||||
/* Unless we have asked to tunnel ftp operations through the proxy, we
|
/* Unless we have asked to tunnel ftp operations through the proxy, we
|
||||||
switch and use HTTP operations only */
|
switch and use HTTP operations only */
|
||||||
#ifndef CURL_DISABLE_HTTP
|
#ifndef CURL_DISABLE_HTTP
|
||||||
if (conn->handler == &Curl_handler_ftp)
|
if (conn->handler == &Curl_handler_ftp)
|
||||||
conn->handler = &Curl_handler_ftp_proxy;
|
conn->handler = &Curl_handler_ftp_proxy;
|
||||||
else
|
else {
|
||||||
conn->handler = &Curl_handler_ftps_proxy;
|
#ifdef USE_SSL
|
||||||
|
conn->handler = &Curl_handler_ftps_proxy;
|
||||||
|
#else
|
||||||
|
failf(data, "FTPS not supported!");
|
||||||
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
failf(data, "FTP over http proxy requires HTTP support built-in!");
|
failf(data, "FTP over http proxy requires HTTP support built-in!");
|
||||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||||
|
@ -110,9 +110,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done);
|
static CURLcode Curl_https_connecting(struct connectdata *conn, bool *done);
|
||||||
|
#ifdef USE_SSL
|
||||||
static int Curl_https_getsock(struct connectdata *conn,
|
static int Curl_https_getsock(struct connectdata *conn,
|
||||||
curl_socket_t *socks,
|
curl_socket_t *socks,
|
||||||
int numsocks);
|
int numsocks);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HTTP handler interface.
|
* HTTP handler interface.
|
||||||
|
@ -194,7 +194,7 @@ extern sigjmp_buf curl_jmpenv;
|
|||||||
* Protocol table.
|
* Protocol table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const struct Curl_handler * protocols[] = {
|
static const struct Curl_handler * const protocols[] = {
|
||||||
|
|
||||||
#ifndef CURL_DISABLE_HTTP
|
#ifndef CURL_DISABLE_HTTP
|
||||||
&Curl_handler_http,
|
&Curl_handler_http,
|
||||||
@ -3020,7 +3020,7 @@ static CURLcode setup_range(struct SessionHandle *data)
|
|||||||
static CURLcode setup_connection_internals(struct SessionHandle *data,
|
static CURLcode setup_connection_internals(struct SessionHandle *data,
|
||||||
struct connectdata *conn)
|
struct connectdata *conn)
|
||||||
{
|
{
|
||||||
const struct Curl_handler * * pp;
|
const struct Curl_handler * const * pp;
|
||||||
const struct Curl_handler * p;
|
const struct Curl_handler * p;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
|
||||||
@ -3028,7 +3028,7 @@ static CURLcode setup_connection_internals(struct SessionHandle *data,
|
|||||||
|
|
||||||
/* Scan protocol handler table. */
|
/* Scan protocol handler table. */
|
||||||
|
|
||||||
for (pp = protocols; p = *pp; pp++)
|
for (pp = protocols; (p = *pp) != NULL; pp++)
|
||||||
if (strequal(p->scheme, conn->protostr)) {
|
if (strequal(p->scheme, conn->protostr)) {
|
||||||
/* Protocol found in table. Perform setup complement if some. */
|
/* Protocol found in table. Perform setup complement if some. */
|
||||||
conn->handler = p;
|
conn->handler = p;
|
||||||
|
Loading…
Reference in New Issue
Block a user