Commit 13b64d75 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

protocols: use CURLPROTO_ internally

The PROT_* set of internal defines for the protocols is no longer
used. We now use the same bits internally as we have defined in the
public header using the CURLPROTO_ prefix. This is for simplicity and
because the PROT_* prefix was already used duplicated internally for a
set of KRB4 values.

The PROTOPT_* defines were moved up to just below the struct definition
within which they are used.
parent 8831000b
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ const struct Curl_handler Curl_handler_rtmp = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMP,                            /* defport */
  PROT_RTMP,                            /* protocol */
  CURLPROTO_RTMP,                       /* protocol */
  PROTOPT_NONE                          /* flags*/
};

@@ -92,7 +92,7 @@ const struct Curl_handler Curl_handler_rtmpt = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMPT,                           /* defport */
  PROT_RTMPT,                           /* protocol */
  CURLPROTO_RTMPT,                      /* protocol */
  PROTOPT_NONE                          /* flags*/
};

@@ -110,7 +110,7 @@ const struct Curl_handler Curl_handler_rtmpe = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMP,                            /* defport */
  PROT_RTMPE,                           /* protocol */
  CURLPROTO_RTMPE,                      /* protocol */
  PROTOPT_NONE                          /* flags*/
};

@@ -128,7 +128,7 @@ const struct Curl_handler Curl_handler_rtmpte = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMPT,                           /* defport */
  PROT_RTMPTE,                          /* protocol */
  CURLPROTO_RTMPTE,                     /* protocol */
  PROTOPT_NONE                          /* flags*/
};

@@ -146,7 +146,7 @@ const struct Curl_handler Curl_handler_rtmps = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMPS,                           /* defport */
  PROT_RTMPS,                           /* protocol */
  CURLPROTO_RTMPS,                      /* protocol */
  PROTOPT_NONE                          /* flags*/
};
const struct Curl_handler Curl_handler_rtmpts = {
@@ -163,7 +163,7 @@ const struct Curl_handler Curl_handler_rtmpts = {
  ZERO_NULL,                            /* perform_getsock */
  rtmp_disconnect,                      /* disconnect */
  PORT_RTMPS,                           /* defport */
  PROT_RTMPTS,                          /* protocol */
  CURLPROTO_RTMPTS,                     /* protocol */
  PROTOPT_NONE                          /* flags*/
};

+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ const struct Curl_handler Curl_handler_dict = {
  ZERO_NULL,                            /* perform_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_DICT,                            /* defport */
  PROT_DICT,                            /* protocol */
  CURLPROTO_DICT,                       /* protocol */
  PROTOPT_NONE                          /* flags */
};

+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ const struct Curl_handler Curl_handler_file = {
  ZERO_NULL,                            /* perform_getsock */
  ZERO_NULL,                            /* disconnect */
  0,                                    /* defport */
  PROT_FILE,                            /* protocol */
  CURLPROTO_FILE,                       /* protocol */
  PROTOPT_BANPROXY                      /* flags */
};

+5 −5
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ const struct Curl_handler Curl_handler_ftp = {
  ZERO_NULL,                       /* perform_getsock */
  ftp_disconnect,                  /* disconnect */
  PORT_FTP,                        /* defport */
  PROT_FTP,                        /* protocol */
  CURLPROTO_FTP,                   /* protocol */
  PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */
};

@@ -203,7 +203,7 @@ const struct Curl_handler Curl_handler_ftps = {
  ZERO_NULL,                       /* perform_getsock */
  ftp_disconnect,                  /* disconnect */
  PORT_FTPS,                       /* defport */
  PROT_FTP | PROT_FTPS,            /* protocol */
  CURLPROTO_FTP | CURLPROTO_FTPS,  /* protocol */
  PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION /* flags */
};
#endif
@@ -227,7 +227,7 @@ static const struct Curl_handler Curl_handler_ftp_proxy = {
  ZERO_NULL,                            /* perform_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_FTP,                             /* defport */
  PROT_HTTP,                            /* protocol */
  CURLPROTO_HTTP,                       /* protocol */
  PROTOPT_NONE                          /* flags */
};

@@ -251,7 +251,7 @@ static const struct Curl_handler Curl_handler_ftps_proxy = {
  ZERO_NULL,                            /* perform_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_FTPS,                            /* defport */
  PROT_HTTP,                            /* protocol */
  CURLPROTO_HTTP,                       /* protocol */
  PROTOPT_NONE                          /* flags */
};
#endif
@@ -2952,7 +2952,7 @@ static CURLcode ftp_connect(struct connectdata *conn,
  }
#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */

  if(conn->handler->protocol & PROT_FTPS) {
  if(conn->handler->protocol & CURLPROTO_FTPS) {
    /* BLOCKING */
    /* FTPS is simply ftp with SSL for the control channel */
    /* now, perform the SSL initialization for this socket */
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ const struct Curl_handler Curl_handler_gopher = {
  ZERO_NULL,                            /* perform_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_GOPHER,                          /* defport */
  PROT_GOPHER,                          /* protocol */
  CURLPROTO_GOPHER,                     /* protocol */
  PROTOPT_NONE                          /* flags */
};

Loading