mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:51:53 +03:00
clang-tidy: enable more checks, fix fallouts
- enable three checks: - bugprone-invalid-enum-default-initialization - bugprone-sizeof-expression - readability-inconsistent-declaration-parameter-name (strict) - fix remaining discrepancies with arg names in prototypes and implementation, in strict mode. - document reason for some checks tested but not enabled. Closes #20794
This commit is contained in:
parent
e0dd6eb4a4
commit
df6014894b
34 changed files with 222 additions and 209 deletions
|
|
@ -16,6 +16,7 @@ Checks:
|
||||||
- bugprone-assignment-in-if-condition
|
- bugprone-assignment-in-if-condition
|
||||||
- bugprone-chained-comparison
|
- bugprone-chained-comparison
|
||||||
- bugprone-dynamic-static-initializers
|
- bugprone-dynamic-static-initializers
|
||||||
|
- bugprone-invalid-enum-default-initialization
|
||||||
- bugprone-macro-parentheses
|
- bugprone-macro-parentheses
|
||||||
- bugprone-macro-repeated-side-effects
|
- bugprone-macro-repeated-side-effects
|
||||||
- bugprone-misplaced-operator-in-strlen-in-alloc
|
- bugprone-misplaced-operator-in-strlen-in-alloc
|
||||||
|
|
@ -24,16 +25,25 @@ Checks:
|
||||||
- bugprone-posix-return
|
- bugprone-posix-return
|
||||||
- bugprone-redundant-branch-condition
|
- bugprone-redundant-branch-condition
|
||||||
- bugprone-signed-char-misuse
|
- bugprone-signed-char-misuse
|
||||||
|
- bugprone-sizeof-expression
|
||||||
- bugprone-suspicious-enum-usage
|
- bugprone-suspicious-enum-usage
|
||||||
- bugprone-suspicious-memset-usage
|
- bugprone-suspicious-memset-usage
|
||||||
- bugprone-suspicious-missing-comma
|
- bugprone-suspicious-missing-comma
|
||||||
- bugprone-suspicious-realloc-usage
|
- bugprone-suspicious-realloc-usage
|
||||||
- bugprone-suspicious-semicolon
|
- bugprone-suspicious-semicolon
|
||||||
|
# bugprone-unchecked-string-to-number-conversion # needs converting sscanf to strtol or curlx_str_*
|
||||||
- misc-const-correctness
|
- misc-const-correctness
|
||||||
- misc-header-include-cycle
|
- misc-header-include-cycle
|
||||||
|
# misc-redundant-expression # undesired hits due to system macros, e.g. due to POLLIN == POLLRDNORM | POLLRDBAND, then or-ing all three
|
||||||
- portability-*
|
- portability-*
|
||||||
- readability-duplicate-include
|
- readability-duplicate-include
|
||||||
|
# readability-else-after-return
|
||||||
|
# readability-enum-initial-value
|
||||||
|
# readability-function-cognitive-complexity
|
||||||
|
- readability-inconsistent-declaration-parameter-name
|
||||||
|
# readability-misleading-indentation # too many false positives and oddball/conditional source
|
||||||
- readability-named-parameter
|
- readability-named-parameter
|
||||||
|
# readability-redundant-casting # false positives in types that change from platform to platform, even with IgnoreTypeAliases: true
|
||||||
- readability-redundant-control-flow
|
- readability-redundant-control-flow
|
||||||
- readability-redundant-declaration
|
- readability-redundant-declaration
|
||||||
- readability-redundant-function-ptr-dereference
|
- readability-redundant-function-ptr-dereference
|
||||||
|
|
@ -44,5 +54,6 @@ Checks:
|
||||||
|
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'
|
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'
|
||||||
|
readability-inconsistent-declaration-parameter-name.Strict: true
|
||||||
|
|
||||||
HeaderFilterRegex: '.*' # Default in v22.1.0+
|
HeaderFilterRegex: '.*' # Default in v22.1.0+
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ curl_easy_header - get an HTTP header
|
||||||
|
|
||||||
CURLHcode curl_easy_header(CURL *easy,
|
CURLHcode curl_easy_header(CURL *easy,
|
||||||
const char *name,
|
const char *name,
|
||||||
size_t index,
|
size_t nameindex,
|
||||||
unsigned int origin,
|
unsigned int origin,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header **hout);
|
struct curl_header **hout);
|
||||||
|
|
@ -38,10 +38,10 @@ curl_easy_header(3) returns a pointer to a "curl_header" struct in **hout**
|
||||||
with data for the HTTP response header *name*. The case insensitive
|
with data for the HTTP response header *name*. The case insensitive
|
||||||
null-terminated header name should be specified without colon.
|
null-terminated header name should be specified without colon.
|
||||||
|
|
||||||
*index* 0 means asking for the first instance of the header. If the returned
|
*nameindex* 0 means asking for the first instance of the header. If the
|
||||||
header struct has **amount** set larger than 1, it means there are more
|
returned header struct has **amount** set larger than 1, it means there are
|
||||||
instances of the same header name available to get. Asking for a too big index
|
more instances of the same header name available to get. Asking for a too big
|
||||||
makes **CURLHE_BADINDEX** get returned.
|
index makes **CURLHE_BADINDEX** get returned.
|
||||||
|
|
||||||
The *origin* argument is for specifying which headers to receive, as a single
|
The *origin* argument is for specifying which headers to receive, as a single
|
||||||
HTTP transfer might provide headers from several different places and they may
|
HTTP transfer might provide headers from several different places and they may
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ curl_easy_pause - pause and unpause a connection
|
||||||
~~~c
|
~~~c
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
CURLcode curl_easy_pause(CURL *handle, int action);
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
@ -54,7 +54,7 @@ A paused transfer is excluded from low speed cancels via the
|
||||||
CURLOPT_LOW_SPEED_LIMIT(3) option and unpausing a transfer resets the
|
CURLOPT_LOW_SPEED_LIMIT(3) option and unpausing a transfer resets the
|
||||||
time period required for the low speed limit to be met.
|
time period required for the low speed limit to be met.
|
||||||
|
|
||||||
The **bitmask** argument is a set of bits that sets the new state of the
|
The **action** argument is a set of bits that sets the new state of the
|
||||||
connection. The following bits can be used:
|
connection. The following bits can be used:
|
||||||
|
|
||||||
## CURLPAUSE_RECV
|
## CURLPAUSE_RECV
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ curl_multi_socket_action(3) function with the **sockfd** argument set
|
||||||
to CURL_SOCKET_TIMEOUT, or call curl_multi_perform(3) if you are using
|
to CURL_SOCKET_TIMEOUT, or call curl_multi_perform(3) if you are using
|
||||||
the simpler and older multi interface approach.
|
the simpler and older multi interface approach.
|
||||||
|
|
||||||
The timeout value returned in the long **timeout** points to, is in number
|
The timeout value returned in the long **timeout_ms** points to, is in number
|
||||||
of milliseconds at this moment. If 0, it means you should proceed immediately
|
of milliseconds at this moment. If 0, it means you should proceed immediately
|
||||||
without waiting for anything. If it returns -1, there is no timeout at all set.
|
without waiting for anything. If it returns -1, there is no timeout at all set.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2695,7 +2695,7 @@ CURL_EXTERN char *curl_version(void);
|
||||||
* %XX versions). This function returns a new allocated string or NULL if an
|
* %XX versions). This function returns a new allocated string or NULL if an
|
||||||
* error occurred.
|
* error occurred.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN char *curl_easy_escape(CURL *handle,
|
CURL_EXTERN char *curl_easy_escape(CURL *curl,
|
||||||
const char *string,
|
const char *string,
|
||||||
int length);
|
int length);
|
||||||
|
|
||||||
|
|
@ -2714,9 +2714,9 @@ CURL_EXTERN char *curl_escape(const char *string,
|
||||||
* Conversion Note: On non-ASCII platforms the ASCII %XX codes are
|
* Conversion Note: On non-ASCII platforms the ASCII %XX codes are
|
||||||
* converted into the host encoding.
|
* converted into the host encoding.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN char *curl_easy_unescape(CURL *handle,
|
CURL_EXTERN char *curl_easy_unescape(CURL *curl,
|
||||||
const char *string,
|
const char *string,
|
||||||
int length,
|
int inlength,
|
||||||
int *outlength);
|
int *outlength);
|
||||||
|
|
||||||
/* the previous version */
|
/* the previous version */
|
||||||
|
|
@ -3076,9 +3076,8 @@ typedef enum {
|
||||||
} CURLSHoption;
|
} CURLSHoption;
|
||||||
|
|
||||||
CURL_EXTERN CURLSH *curl_share_init(void);
|
CURL_EXTERN CURLSH *curl_share_init(void);
|
||||||
CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
|
CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...);
|
||||||
...);
|
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *sh);
|
||||||
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Structures for querying information about the curl library at runtime.
|
* Structures for querying information about the curl library at runtime.
|
||||||
|
|
@ -3246,10 +3245,10 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode error);
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
*
|
*
|
||||||
* The curl_easy_pause function pauses or unpauses transfers. Select the new
|
* The curl_easy_pause function pauses or unpauses transfers. Select the new
|
||||||
* state by setting the bitmask, use the convenience defines below.
|
* state by setting the action bitmask, use the convenience defines below.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
CURL_EXTERN CURLcode curl_easy_pause(CURL *curl, int action);
|
||||||
|
|
||||||
#define CURLPAUSE_RECV (1 << 0)
|
#define CURLPAUSE_RECV (1 << 0)
|
||||||
#define CURLPAUSE_RECV_CONT 0
|
#define CURLPAUSE_RECV_CONT 0
|
||||||
|
|
@ -3268,7 +3267,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
|
||||||
* The curl_easy_ssls_import function adds a previously exported SSL session
|
* The curl_easy_ssls_import function adds a previously exported SSL session
|
||||||
* to the SSL session cache of the easy handle (or the underlying share).
|
* to the SSL session cache of the easy handle (or the underlying share).
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *handle,
|
CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *curl,
|
||||||
const char *session_key,
|
const char *session_key,
|
||||||
const unsigned char *shmac,
|
const unsigned char *shmac,
|
||||||
size_t shmac_len,
|
size_t shmac_len,
|
||||||
|
|
@ -3277,7 +3276,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *handle,
|
||||||
|
|
||||||
/* This is the curl_ssls_export_cb callback prototype. It
|
/* This is the curl_ssls_export_cb callback prototype. It
|
||||||
* is passed to curl_easy_ssls_export() to extract SSL sessions/tickets. */
|
* is passed to curl_easy_ssls_export() to extract SSL sessions/tickets. */
|
||||||
typedef CURLcode curl_ssls_export_cb(CURL *handle,
|
typedef CURLcode curl_ssls_export_cb(CURL *curl,
|
||||||
void *userptr,
|
void *userptr,
|
||||||
const char *session_key,
|
const char *session_key,
|
||||||
const unsigned char *shmac,
|
const unsigned char *shmac,
|
||||||
|
|
@ -3299,7 +3298,7 @@ typedef CURLcode curl_ssls_export_cb(CURL *handle,
|
||||||
* callback.
|
* callback.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
|
CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *curl,
|
||||||
curl_ssls_export_cb *export_fn,
|
curl_ssls_export_cb *export_fn,
|
||||||
void *userptr);
|
void *userptr);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,14 @@ typedef enum {
|
||||||
CURLHE_NOT_BUILT_IN /* if API was disabled in the build */
|
CURLHE_NOT_BUILT_IN /* if API was disabled in the build */
|
||||||
} CURLHcode;
|
} CURLHcode;
|
||||||
|
|
||||||
CURL_EXTERN CURLHcode curl_easy_header(CURL *easy,
|
CURL_EXTERN CURLHcode curl_easy_header(CURL *curl,
|
||||||
const char *name,
|
const char *name,
|
||||||
size_t index,
|
size_t nameindex,
|
||||||
unsigned int origin,
|
unsigned int origin,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header **hout);
|
struct curl_header **hout);
|
||||||
|
|
||||||
CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy,
|
CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *curl,
|
||||||
unsigned int origin,
|
unsigned int origin,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header *prev);
|
struct curl_header *prev);
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,8 @@ CURL_EXTERN CURLM *curl_multi_init(void);
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *m,
|
||||||
CURL *curl_handle);
|
CURL *curl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Name: curl_multi_remove_handle()
|
* Name: curl_multi_remove_handle()
|
||||||
|
|
@ -142,8 +142,8 @@ CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *m,
|
||||||
CURL *curl_handle);
|
CURL *curl);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Name: curl_multi_fdset()
|
* Name: curl_multi_fdset()
|
||||||
|
|
@ -154,7 +154,7 @@ CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *m,
|
||||||
fd_set *read_fd_set,
|
fd_set *read_fd_set,
|
||||||
fd_set *write_fd_set,
|
fd_set *write_fd_set,
|
||||||
fd_set *exc_fd_set,
|
fd_set *exc_fd_set,
|
||||||
|
|
@ -168,7 +168,7 @@ CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *m,
|
||||||
struct curl_waitfd extra_fds[],
|
struct curl_waitfd extra_fds[],
|
||||||
unsigned int extra_nfds,
|
unsigned int extra_nfds,
|
||||||
int timeout_ms,
|
int timeout_ms,
|
||||||
|
|
@ -182,7 +182,7 @@ CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_poll(CURLM *m,
|
||||||
struct curl_waitfd extra_fds[],
|
struct curl_waitfd extra_fds[],
|
||||||
unsigned int extra_nfds,
|
unsigned int extra_nfds,
|
||||||
int timeout_ms,
|
int timeout_ms,
|
||||||
|
|
@ -195,7 +195,7 @@ CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle);
|
CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *m);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Name: curl_multi_perform()
|
* Name: curl_multi_perform()
|
||||||
|
|
@ -213,7 +213,7 @@ CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle);
|
||||||
* still have occurred problems on individual transfers even when
|
* still have occurred problems on individual transfers even when
|
||||||
* this returns OK.
|
* this returns OK.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *m,
|
||||||
int *running_handles);
|
int *running_handles);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -226,7 +226,7 @@ CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *m);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Name: curl_multi_info_read()
|
* Name: curl_multi_info_read()
|
||||||
|
|
@ -256,7 +256,7 @@ CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
||||||
* queue (after this read) in the integer the second argument points
|
* queue (after this read) in the integer the second argument points
|
||||||
* to.
|
* to.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *m,
|
||||||
int *msgs_in_queue);
|
int *msgs_in_queue);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -308,21 +308,21 @@ typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
|
||||||
*
|
*
|
||||||
* Returns: The callback should return zero.
|
* Returns: The callback should return zero.
|
||||||
*/
|
*/
|
||||||
typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
|
typedef int (*curl_multi_timer_callback)(CURLM *m, /* multi handle */
|
||||||
long timeout_ms, /* see above */
|
long timeout_ms, /* see above */
|
||||||
void *userp); /* private callback
|
void *userp); /* private callback
|
||||||
pointer */
|
pointer */
|
||||||
|
|
||||||
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
||||||
curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles);
|
curl_multi_socket(CURLM *m, curl_socket_t s, int *running_handles);
|
||||||
|
|
||||||
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *m,
|
||||||
curl_socket_t s,
|
curl_socket_t s,
|
||||||
int ev_bitmask,
|
int ev_bitmask,
|
||||||
int *running_handles);
|
int *running_handles);
|
||||||
|
|
||||||
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
|
||||||
curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
|
curl_multi_socket_all(CURLM *m, int *running_handles);
|
||||||
|
|
||||||
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
|
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
|
||||||
/* This macro below was added in 7.16.3 to push users who recompile to use
|
/* This macro below was added in 7.16.3 to push users who recompile to use
|
||||||
|
|
@ -340,8 +340,8 @@ curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
|
||||||
*
|
*
|
||||||
* Returns: CURLM error code.
|
* Returns: CURLM error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *m,
|
||||||
long *milliseconds);
|
long *timeout_ms);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* This is the socket callback function pointer */
|
/* This is the socket callback function pointer */
|
||||||
|
|
@ -435,7 +435,7 @@ typedef enum {
|
||||||
*
|
*
|
||||||
* Returns: CURLM error code.
|
* Returns: CURLM error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *m,
|
||||||
CURLMoption option, ...);
|
CURLMoption option, ...);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -447,7 +447,7 @@ CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: CURLM error code.
|
* Returns: CURLM error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *m,
|
||||||
curl_socket_t sockfd, void *sockp);
|
curl_socket_t sockfd, void *sockp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -460,7 +460,7 @@ CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
|
||||||
*
|
*
|
||||||
* Returns: NULL on failure, otherwise a CURL **array pointer
|
* Returns: NULL on failure, otherwise a CURL **array pointer
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle);
|
CURL_EXTERN CURL **curl_multi_get_handles(CURLM *m);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CURLMINFO_NONE, /* first, never use this */
|
CURLMINFO_NONE, /* first, never use this */
|
||||||
|
|
@ -489,7 +489,7 @@ typedef enum {
|
||||||
*
|
*
|
||||||
* Returns: CULRM_OK or error when value could not be obtained.
|
* Returns: CULRM_OK or error when value could not be obtained.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_get_offt(CURLM *multi_handle,
|
CURL_EXTERN CURLMcode curl_multi_get_offt(CURLM *m,
|
||||||
CURLMinfo_offt info,
|
CURLMinfo_offt info,
|
||||||
curl_off_t *pvalue);
|
curl_off_t *pvalue);
|
||||||
|
|
||||||
|
|
@ -528,7 +528,7 @@ typedef int (*curl_push_callback)(CURL *parent,
|
||||||
*
|
*
|
||||||
* Returns: CURLMcode type, general multi error code.
|
* Returns: CURLMcode type, general multi error code.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *multi,
|
CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *m,
|
||||||
struct curl_waitfd *ufds,
|
struct curl_waitfd *ufds,
|
||||||
unsigned int size,
|
unsigned int size,
|
||||||
unsigned int *fd_count);
|
unsigned int *fd_count);
|
||||||
|
|
@ -542,15 +542,15 @@ CURL_EXTERN CURLMcode curl_multi_waitfds(CURLM *multi,
|
||||||
/*
|
/*
|
||||||
* Callback to install via CURLMOPT_NOTIFYFUNCTION.
|
* Callback to install via CURLMOPT_NOTIFYFUNCTION.
|
||||||
*/
|
*/
|
||||||
typedef void (*curl_notify_callback)(CURLM *multi,
|
typedef void (*curl_notify_callback)(CURLM *m,
|
||||||
unsigned int notification,
|
unsigned int notification,
|
||||||
CURL *easy,
|
CURL *easy,
|
||||||
void *user_data);
|
void *user_data);
|
||||||
|
|
||||||
CURL_EXTERN CURLMcode curl_multi_notify_disable(CURLM *multi,
|
CURL_EXTERN CURLMcode curl_multi_notify_disable(CURLM *m,
|
||||||
unsigned int notification);
|
unsigned int notification);
|
||||||
|
|
||||||
CURL_EXTERN CURLMcode curl_multi_notify_enable(CURLM *multi,
|
CURL_EXTERN CURLMcode curl_multi_notify_enable(CURLM *m,
|
||||||
unsigned int notification);
|
unsigned int notification);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ CURL_EXTERN CURLU *curl_url(void);
|
||||||
* the URL parsing. It does not free strings previously returned with the URL
|
* the URL parsing. It does not free strings previously returned with the URL
|
||||||
* API.
|
* API.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN void curl_url_cleanup(CURLU *handle);
|
CURL_EXTERN void curl_url_cleanup(CURLU *u);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
|
* curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
|
||||||
|
|
@ -130,7 +130,7 @@ CURL_EXTERN CURLU *curl_url_dup(const CURLU *in);
|
||||||
* handle. Returns error code. The returned pointer MUST be freed with
|
* handle. Returns error code. The returned pointer MUST be freed with
|
||||||
* curl_free() afterwards.
|
* curl_free() afterwards.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLUcode curl_url_get(const CURLU *handle, CURLUPart what,
|
CURL_EXTERN CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
||||||
char **part, unsigned int flags);
|
char **part, unsigned int flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -138,7 +138,7 @@ CURL_EXTERN CURLUcode curl_url_get(const CURLU *handle, CURLUPart what,
|
||||||
* error code. The passed in string is copied. Passing a NULL instead of
|
* error code. The passed in string is copied. Passing a NULL instead of
|
||||||
* a part string, clears that part.
|
* a part string, clears that part.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what,
|
CURL_EXTERN CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
||||||
const char *part, unsigned int flags);
|
const char *part, unsigned int flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
|
||||||
* Sends data over the websocket connection. Use after successful
|
* Sends data over the websocket connection. Use after successful
|
||||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||||
*/
|
*/
|
||||||
CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer,
|
CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer_arg,
|
||||||
size_t buflen, size_t *sent,
|
size_t buflen, size_t *sent,
|
||||||
curl_off_t fragsize,
|
curl_off_t fragsize,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ OM_uint32 Curl_gss_init_sec_context(struct Curl_easy *data,
|
||||||
OM_uint32 *ret_flags);
|
OM_uint32 *ret_flags);
|
||||||
|
|
||||||
OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
|
OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
|
||||||
gss_ctx_id_t *context_handle,
|
gss_ctx_id_t *context,
|
||||||
gss_buffer_t output_token);
|
gss_buffer_t output_token);
|
||||||
|
|
||||||
#ifdef CURLVERBOSE
|
#ifdef CURLVERBOSE
|
||||||
|
|
|
||||||
|
|
@ -1387,7 +1387,8 @@ CURL_EXTERN void curl_dbg_mark_sclose(curl_socket_t sockfd,
|
||||||
int line, const char *source);
|
int line, const char *source);
|
||||||
CURL_EXTERN int curl_dbg_sclose(curl_socket_t sockfd,
|
CURL_EXTERN int curl_dbg_sclose(curl_socket_t sockfd,
|
||||||
int line, const char *source);
|
int line, const char *source);
|
||||||
CURL_EXTERN curl_socket_t curl_dbg_accept(curl_socket_t s, void *a, void *alen,
|
CURL_EXTERN curl_socket_t curl_dbg_accept(curl_socket_t s,
|
||||||
|
void *saddr, void *saddrlen,
|
||||||
int line, const char *source);
|
int line, const char *source);
|
||||||
#ifdef HAVE_ACCEPT4
|
#ifdef HAVE_ACCEPT4
|
||||||
CURL_EXTERN curl_socket_t curl_dbg_accept4(curl_socket_t s, void *saddr,
|
CURL_EXTERN curl_socket_t curl_dbg_accept4(curl_socket_t s, void *saddr,
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ size_t curlx_dyn_len(const struct dynbuf *s);
|
||||||
|
|
||||||
/* returns 0 on success, -1 on error */
|
/* returns 0 on success, -1 on error */
|
||||||
/* The implementation of this function exists in mprintf.c */
|
/* The implementation of this function exists in mprintf.c */
|
||||||
int curlx_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list ap_save);
|
int curlx_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list args);
|
||||||
|
|
||||||
/* Take the buffer out of the dynbuf. Caller has ownership and
|
/* Take the buffer out of the dynbuf. Caller has ownership and
|
||||||
* dynbuf resets to initial state. */
|
* dynbuf resets to initial state. */
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ HANDLE curlx_CreateFile(const char *filename,
|
||||||
#define curlx_fstat _fstati64
|
#define curlx_fstat _fstati64
|
||||||
#define curlx_struct_stat struct _stati64
|
#define curlx_struct_stat struct _stati64
|
||||||
FILE *curlx_win32_fopen(const char *filename, const char *mode);
|
FILE *curlx_win32_fopen(const char *filename, const char *mode);
|
||||||
FILE *curlx_win32_freopen(const char *filename, const char *mode, FILE *fh);
|
FILE *curlx_win32_freopen(const char *filename, const char *mode, FILE *fp);
|
||||||
int curlx_win32_stat(const char *path, curlx_struct_stat *buffer);
|
int curlx_win32_stat(const char *path, curlx_struct_stat *buffer);
|
||||||
int curlx_win32_open(const char *filename, int oflag, ...);
|
int curlx_win32_open(const char *filename, int oflag, ...);
|
||||||
int curlx_win32_rename(const char *oldpath, const char *newpath);
|
int curlx_win32_rename(const char *oldpath, const char *newpath);
|
||||||
|
|
|
||||||
|
|
@ -36,15 +36,15 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef __AMIGA__
|
#ifdef __AMIGA__
|
||||||
#define curlx_inet_ntop(af, addr, buf, size) \
|
#define curlx_inet_ntop(af, src, buf, size) \
|
||||||
(char *)inet_ntop(af, CURL_UNCONST(addr), (unsigned char *)(buf), \
|
(char *)inet_ntop(af, CURL_UNCONST(src), (unsigned char *)(buf), \
|
||||||
(curl_socklen_t)(size))
|
(curl_socklen_t)(size))
|
||||||
#else
|
#else
|
||||||
#define curlx_inet_ntop(af, addr, buf, size) \
|
#define curlx_inet_ntop(af, src, buf, size) \
|
||||||
inet_ntop(af, addr, buf, (curl_socklen_t)(size))
|
inet_ntop(af, src, buf, (curl_socklen_t)(size))
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
char *curlx_inet_ntop(int af, const void *addr, char *buf, size_t size);
|
char *curlx_inet_ntop(int af, const void *src, char *buf, size_t size);
|
||||||
#endif /* HAVE_INET_NTOP */
|
#endif /* HAVE_INET_NTOP */
|
||||||
|
|
||||||
#endif /* HEADER_CURL_INET_NTOP_H */
|
#endif /* HEADER_CURL_INET_NTOP_H */
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ struct Curl_dnscache {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* init a new dns cache */
|
/* init a new dns cache */
|
||||||
void Curl_dnscache_init(struct Curl_dnscache *dns, size_t hashsize);
|
void Curl_dnscache_init(struct Curl_dnscache *dns, size_t size);
|
||||||
|
|
||||||
void Curl_dnscache_destroy(struct Curl_dnscache *dns);
|
void Curl_dnscache_destroy(struct Curl_dnscache *dns);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,13 +117,12 @@ struct doh_probes {
|
||||||
* Curl_doh() starts a name resolve using DoH (DNS-over-HTTPS). It resolves a
|
* Curl_doh() starts a name resolve using DoH (DNS-over-HTTPS). It resolves a
|
||||||
* name and returns a 'Curl_addrinfo *' with the address information.
|
* name and returns a 'Curl_addrinfo *' with the address information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CURLcode Curl_doh(struct Curl_easy *data,
|
CURLcode Curl_doh(struct Curl_easy *data,
|
||||||
struct Curl_resolv_async *async);
|
struct Curl_resolv_async *async);
|
||||||
|
|
||||||
CURLcode Curl_doh_take_result(struct Curl_easy *data,
|
CURLcode Curl_doh_take_result(struct Curl_easy *data,
|
||||||
struct Curl_resolv_async *async,
|
struct Curl_resolv_async *async,
|
||||||
struct Curl_dns_entry **dns);
|
struct Curl_dns_entry **pdns);
|
||||||
|
|
||||||
#define DOH_MAX_ADDR 24
|
#define DOH_MAX_ADDR 24
|
||||||
#define DOH_MAX_CNAME 4
|
#define DOH_MAX_CNAME 4
|
||||||
|
|
|
||||||
53
lib/easy.c
53
lib/easy.c
|
|
@ -815,9 +815,9 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events)
|
||||||
* curl_easy_perform() is the external interface that performs a blocking
|
* curl_easy_perform() is the external interface that performs a blocking
|
||||||
* transfer as previously setup.
|
* transfer as previously setup.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_perform(CURL *data)
|
CURLcode curl_easy_perform(CURL *curl)
|
||||||
{
|
{
|
||||||
return easy_perform(data, FALSE);
|
return easy_perform(curl, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUGBUILD
|
#ifdef DEBUGBUILD
|
||||||
|
|
@ -825,9 +825,9 @@ CURLcode curl_easy_perform(CURL *data)
|
||||||
* curl_easy_perform_ev() is the external interface that performs a blocking
|
* curl_easy_perform_ev() is the external interface that performs a blocking
|
||||||
* transfer using the event-based API internally.
|
* transfer using the event-based API internally.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_perform_ev(struct Curl_easy *data)
|
CURLcode curl_easy_perform_ev(struct Curl_easy *easy)
|
||||||
{
|
{
|
||||||
return easy_perform(data, TRUE);
|
return easy_perform(easy, TRUE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -835,9 +835,9 @@ CURLcode curl_easy_perform_ev(struct Curl_easy *data)
|
||||||
* curl_easy_cleanup() is the external interface to cleaning/freeing the given
|
* curl_easy_cleanup() is the external interface to cleaning/freeing the given
|
||||||
* easy handle.
|
* easy handle.
|
||||||
*/
|
*/
|
||||||
void curl_easy_cleanup(CURL *ptr)
|
void curl_easy_cleanup(CURL *curl)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = ptr;
|
struct Curl_easy *data = curl;
|
||||||
if(GOOD_EASY_HANDLE(data)) {
|
if(GOOD_EASY_HANDLE(data)) {
|
||||||
struct Curl_sigpipe_ctx sigpipe_ctx;
|
struct Curl_sigpipe_ctx sigpipe_ctx;
|
||||||
sigpipe_ignore(data, &sigpipe_ctx);
|
sigpipe_ignore(data, &sigpipe_ctx);
|
||||||
|
|
@ -851,9 +851,9 @@ void curl_easy_cleanup(CURL *ptr)
|
||||||
* information from a performed transfer and similar.
|
* information from a performed transfer and similar.
|
||||||
*/
|
*/
|
||||||
#undef curl_easy_getinfo
|
#undef curl_easy_getinfo
|
||||||
CURLcode curl_easy_getinfo(CURL *easy, CURLINFO info, ...)
|
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = easy;
|
struct Curl_easy *data = curl;
|
||||||
va_list arg;
|
va_list arg;
|
||||||
void *paramp;
|
void *paramp;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
|
@ -950,9 +950,9 @@ static void dupeasy_meta_freeentry(void *p)
|
||||||
* given input easy handle. The returned handle will be a new working handle
|
* given input easy handle. The returned handle will be a new working handle
|
||||||
* with all options set exactly as the input source handle.
|
* with all options set exactly as the input source handle.
|
||||||
*/
|
*/
|
||||||
CURL *curl_easy_duphandle(CURL *d)
|
CURL *curl_easy_duphandle(CURL *curl)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
struct Curl_easy *outcurl = NULL;
|
struct Curl_easy *outcurl = NULL;
|
||||||
|
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
|
|
@ -1081,9 +1081,9 @@ fail:
|
||||||
* curl_easy_reset() is an external interface that allows an app to re-
|
* curl_easy_reset() is an external interface that allows an app to re-
|
||||||
* initialize a session handle to the default values.
|
* initialize a session handle to the default values.
|
||||||
*/
|
*/
|
||||||
void curl_easy_reset(CURL *d)
|
void curl_easy_reset(CURL *curl)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -1130,12 +1130,12 @@ void curl_easy_reset(CURL *d)
|
||||||
* NOTE: This is one of few API functions that are allowed to be called from
|
* NOTE: This is one of few API functions that are allowed to be called from
|
||||||
* within a callback.
|
* within a callback.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_pause(CURL *d, int action)
|
CURLcode curl_easy_pause(CURL *curl, int action)
|
||||||
{
|
{
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
bool recursive = FALSE;
|
bool recursive = FALSE;
|
||||||
bool changed = FALSE;
|
bool changed = FALSE;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
bool recv_paused, recv_paused_new;
|
bool recv_paused, recv_paused_new;
|
||||||
bool send_paused, send_paused_new;
|
bool send_paused, send_paused_new;
|
||||||
|
|
||||||
|
|
@ -1220,11 +1220,11 @@ static CURLcode easy_connection(struct Curl_easy *data,
|
||||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||||
* Returns CURLE_OK on success, error code on error.
|
* Returns CURLE_OK on success, error code on error.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_recv(CURL *d, void *buffer, size_t buflen, size_t *n)
|
CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, size_t *n)
|
||||||
{
|
{
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct connectdata *c;
|
struct connectdata *c;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
|
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
@ -1298,11 +1298,12 @@ CURLcode Curl_senddata(struct Curl_easy *data, const void *buffer,
|
||||||
* Sends data over the connected socket. Use after successful
|
* Sends data over the connected socket. Use after successful
|
||||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_send(CURL *d, const void *buffer, size_t buflen, size_t *n)
|
CURLcode curl_easy_send(CURL *curl, const void *buffer, size_t buflen,
|
||||||
|
size_t *n)
|
||||||
{
|
{
|
||||||
size_t written = 0;
|
size_t written = 0;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
if(Curl_is_in_callback(data))
|
if(Curl_is_in_callback(data))
|
||||||
|
|
@ -1316,9 +1317,9 @@ CURLcode curl_easy_send(CURL *d, const void *buffer, size_t buflen, size_t *n)
|
||||||
/*
|
/*
|
||||||
* Performs connection upkeep for the given session handle.
|
* Performs connection upkeep for the given session handle.
|
||||||
*/
|
*/
|
||||||
CURLcode curl_easy_upkeep(CURL *d)
|
CURLcode curl_easy_upkeep(CURL *curl)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
/* Verify that we got an easy handle we can work with. */
|
/* Verify that we got an easy handle we can work with. */
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
@ -1330,18 +1331,18 @@ CURLcode curl_easy_upkeep(CURL *d)
|
||||||
return Curl_cpool_upkeep(data);
|
return Curl_cpool_upkeep(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode curl_easy_ssls_import(CURL *d, const char *session_key,
|
CURLcode curl_easy_ssls_import(CURL *curl, const char *session_key,
|
||||||
const unsigned char *shmac, size_t shmac_len,
|
const unsigned char *shmac, size_t shmac_len,
|
||||||
const unsigned char *sdata, size_t sdata_len)
|
const unsigned char *sdata, size_t sdata_len)
|
||||||
{
|
{
|
||||||
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
|
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
return Curl_ssl_session_import(data, session_key,
|
return Curl_ssl_session_import(data, session_key,
|
||||||
shmac, shmac_len, sdata, sdata_len);
|
shmac, shmac_len, sdata, sdata_len);
|
||||||
#else
|
#else
|
||||||
(void)d;
|
(void)curl;
|
||||||
(void)session_key;
|
(void)session_key;
|
||||||
(void)shmac;
|
(void)shmac;
|
||||||
(void)shmac_len;
|
(void)shmac_len;
|
||||||
|
|
@ -1351,17 +1352,17 @@ CURLcode curl_easy_ssls_import(CURL *d, const char *session_key,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode curl_easy_ssls_export(CURL *d,
|
CURLcode curl_easy_ssls_export(CURL *curl,
|
||||||
curl_ssls_export_cb *export_fn,
|
curl_ssls_export_cb *export_fn,
|
||||||
void *userptr)
|
void *userptr)
|
||||||
{
|
{
|
||||||
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
|
#if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
return Curl_ssl_session_export(data, export_fn, userptr);
|
return Curl_ssl_session_export(data, export_fn, userptr);
|
||||||
#else
|
#else
|
||||||
(void)d;
|
(void)curl;
|
||||||
(void)export_fn;
|
(void)export_fn;
|
||||||
(void)userptr;
|
(void)userptr;
|
||||||
return CURLE_NOT_BUILT_IN;
|
return CURLE_NOT_BUILT_IN;
|
||||||
|
|
|
||||||
35
lib/escape.c
35
lib/escape.c
|
|
@ -33,9 +33,9 @@ struct Curl_easy;
|
||||||
#include "curl_printf.h"
|
#include "curl_printf.h"
|
||||||
|
|
||||||
/* for ABI-compatibility with previous versions */
|
/* for ABI-compatibility with previous versions */
|
||||||
char *curl_escape(const char *string, int inlength)
|
char *curl_escape(const char *string, int length)
|
||||||
{
|
{
|
||||||
return curl_easy_escape(NULL, string, inlength);
|
return curl_easy_escape(NULL, string, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for ABI-compatibility with previous versions */
|
/* for ABI-compatibility with previous versions */
|
||||||
|
|
@ -47,25 +47,25 @@ char *curl_unescape(const char *string, int length)
|
||||||
/* Escapes for URL the given unescaped string of given length.
|
/* Escapes for URL the given unescaped string of given length.
|
||||||
* 'data' is ignored since 7.82.0.
|
* 'data' is ignored since 7.82.0.
|
||||||
*/
|
*/
|
||||||
char *curl_easy_escape(CURL *data, const char *string, int inlength)
|
char *curl_easy_escape(CURL *curl, const char *string, int length)
|
||||||
{
|
{
|
||||||
size_t length;
|
size_t len;
|
||||||
struct dynbuf d;
|
struct dynbuf d;
|
||||||
(void)data;
|
(void)curl;
|
||||||
|
|
||||||
if(!string || (inlength < 0))
|
if(!string || (length < 0))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
length = (inlength ? (size_t)inlength : strlen(string));
|
len = (length ? (size_t)length : strlen(string));
|
||||||
if(!length)
|
if(!len)
|
||||||
return curlx_strdup("");
|
return curlx_strdup("");
|
||||||
|
|
||||||
if(length > SIZE_MAX / 16)
|
if(len > SIZE_MAX / 16)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
curlx_dyn_init(&d, (length * 3) + 1);
|
curlx_dyn_init(&d, (len * 3) + 1);
|
||||||
|
|
||||||
while(length--) {
|
while(len--) {
|
||||||
/* treat the characters unsigned */
|
/* treat the characters unsigned */
|
||||||
unsigned char in = (unsigned char)*string++;
|
unsigned char in = (unsigned char)*string++;
|
||||||
|
|
||||||
|
|
@ -160,21 +160,22 @@ CURLcode Curl_urldecode(const char *string, size_t length,
|
||||||
* If olen == NULL, no output length is stored.
|
* If olen == NULL, no output length is stored.
|
||||||
* 'data' is ignored since 7.82.0.
|
* 'data' is ignored since 7.82.0.
|
||||||
*/
|
*/
|
||||||
char *curl_easy_unescape(CURL *data, const char *string, int length, int *olen)
|
char *curl_easy_unescape(CURL *curl, const char *string, int inlength,
|
||||||
|
int *outlength)
|
||||||
{
|
{
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
(void)data;
|
(void)curl;
|
||||||
if(string && (length >= 0)) {
|
if(string && (inlength >= 0)) {
|
||||||
size_t inputlen = (size_t)length;
|
size_t inputlen = (size_t)inlength;
|
||||||
size_t outputlen;
|
size_t outputlen;
|
||||||
CURLcode res = Curl_urldecode(string, inputlen, &str, &outputlen,
|
CURLcode res = Curl_urldecode(string, inputlen, &str, &outputlen,
|
||||||
REJECT_NADA);
|
REJECT_NADA);
|
||||||
if(res)
|
if(res)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if(olen) {
|
if(outlength) {
|
||||||
if(outputlen <= (size_t)INT_MAX)
|
if(outputlen <= (size_t)INT_MAX)
|
||||||
*olen = curlx_uztosi(outputlen);
|
*outlength = curlx_uztosi(outputlen);
|
||||||
else
|
else
|
||||||
/* too large to return in an int, fail! */
|
/* too large to return in an int, fail! */
|
||||||
curlx_safefree(str);
|
curlx_safefree(str);
|
||||||
|
|
|
||||||
|
|
@ -52,23 +52,23 @@ static void copy_header_external(struct Curl_header_store *hs,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public API */
|
/* public API */
|
||||||
CURLHcode curl_easy_header(CURL *easy,
|
CURLHcode curl_easy_header(CURL *curl,
|
||||||
const char *name,
|
const char *name,
|
||||||
size_t nameindex,
|
size_t nameindex,
|
||||||
unsigned int type,
|
unsigned int origin,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header **hout)
|
struct curl_header **hout)
|
||||||
{
|
{
|
||||||
struct Curl_llist_node *e;
|
struct Curl_llist_node *e;
|
||||||
struct Curl_llist_node *e_pick = NULL;
|
struct Curl_llist_node *e_pick = NULL;
|
||||||
struct Curl_easy *data = easy;
|
struct Curl_easy *data = curl;
|
||||||
size_t match = 0;
|
size_t match = 0;
|
||||||
size_t amount = 0;
|
size_t amount = 0;
|
||||||
struct Curl_header_store *hs = NULL;
|
struct Curl_header_store *hs = NULL;
|
||||||
struct Curl_header_store *pick = NULL;
|
struct Curl_header_store *pick = NULL;
|
||||||
if(!name || !hout || !data ||
|
if(!name || !hout || !data ||
|
||||||
(type > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
|
(origin > (CURLH_HEADER | CURLH_TRAILER | CURLH_CONNECT | CURLH_1XX |
|
||||||
CURLH_PSEUDO)) || !type || (request < -1))
|
CURLH_PSEUDO)) || !origin || (request < -1))
|
||||||
return CURLHE_BAD_ARGUMENT;
|
return CURLHE_BAD_ARGUMENT;
|
||||||
if(!Curl_llist_count(&data->state.httphdrs))
|
if(!Curl_llist_count(&data->state.httphdrs))
|
||||||
return CURLHE_NOHEADERS; /* no headers available */
|
return CURLHE_NOHEADERS; /* no headers available */
|
||||||
|
|
@ -81,7 +81,7 @@ CURLHcode curl_easy_header(CURL *easy,
|
||||||
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
||||||
hs = Curl_node_elem(e);
|
hs = Curl_node_elem(e);
|
||||||
if(curl_strequal(hs->name, name) &&
|
if(curl_strequal(hs->name, name) &&
|
||||||
(hs->type & type) &&
|
(hs->type & origin) &&
|
||||||
(hs->request == request)) {
|
(hs->request == request)) {
|
||||||
amount++;
|
amount++;
|
||||||
pick = hs;
|
pick = hs;
|
||||||
|
|
@ -100,7 +100,7 @@ CURLHcode curl_easy_header(CURL *easy,
|
||||||
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
for(e = Curl_llist_head(&data->state.httphdrs); e; e = Curl_node_next(e)) {
|
||||||
hs = Curl_node_elem(e);
|
hs = Curl_node_elem(e);
|
||||||
if(curl_strequal(hs->name, name) &&
|
if(curl_strequal(hs->name, name) &&
|
||||||
(hs->type & type) &&
|
(hs->type & origin) &&
|
||||||
(hs->request == request) &&
|
(hs->request == request) &&
|
||||||
(match++ == nameindex)) {
|
(match++ == nameindex)) {
|
||||||
e_pick = e;
|
e_pick = e;
|
||||||
|
|
@ -118,12 +118,12 @@ CURLHcode curl_easy_header(CURL *easy,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public API */
|
/* public API */
|
||||||
struct curl_header *curl_easy_nextheader(CURL *easy,
|
struct curl_header *curl_easy_nextheader(CURL *curl,
|
||||||
unsigned int type,
|
unsigned int origin,
|
||||||
int request,
|
int request,
|
||||||
struct curl_header *prev)
|
struct curl_header *prev)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = easy;
|
struct Curl_easy *data = curl;
|
||||||
struct Curl_llist_node *pick;
|
struct Curl_llist_node *pick;
|
||||||
struct Curl_llist_node *e;
|
struct Curl_llist_node *e;
|
||||||
struct Curl_header_store *hs;
|
struct Curl_header_store *hs;
|
||||||
|
|
@ -149,7 +149,7 @@ struct curl_header *curl_easy_nextheader(CURL *easy,
|
||||||
/* make sure it is the next header of the desired type */
|
/* make sure it is the next header of the desired type */
|
||||||
do {
|
do {
|
||||||
hs = Curl_node_elem(pick);
|
hs = Curl_node_elem(pick);
|
||||||
if((hs->type & type) && (hs->request == request))
|
if((hs->type & origin) && (hs->request == request))
|
||||||
break;
|
break;
|
||||||
pick = Curl_node_next(pick);
|
pick = Curl_node_next(pick);
|
||||||
} while(pick);
|
} while(pick);
|
||||||
|
|
@ -167,7 +167,7 @@ struct curl_header *curl_easy_nextheader(CURL *easy,
|
||||||
struct Curl_header_store *check = Curl_node_elem(e);
|
struct Curl_header_store *check = Curl_node_elem(e);
|
||||||
if(curl_strequal(hs->name, check->name) &&
|
if(curl_strequal(hs->name, check->name) &&
|
||||||
(check->request == request) &&
|
(check->request == request) &&
|
||||||
(check->type & type))
|
(check->type & origin))
|
||||||
amount++;
|
amount++;
|
||||||
if(e == pick)
|
if(e == pick)
|
||||||
index = amount - 1;
|
index = amount - 1;
|
||||||
|
|
|
||||||
16
lib/hostip.c
16
lib/hostip.c
|
|
@ -914,10 +914,10 @@ clean_up:
|
||||||
* is ignored.
|
* is ignored.
|
||||||
*
|
*
|
||||||
* Return codes:
|
* Return codes:
|
||||||
* CURLE_OK = success, *entry set to non-NULL
|
* CURLE_OK = success, *pdns set to non-NULL
|
||||||
* CURLE_AGAIN = resolving in progress, *entry == NULL
|
* CURLE_AGAIN = resolving in progress, *pdns == NULL
|
||||||
* CURLE_COULDNT_RESOLVE_HOST = error, *entry == NULL
|
* CURLE_COULDNT_RESOLVE_HOST = error, *pdns == NULL
|
||||||
* CURLE_OPERATION_TIMEDOUT = timeout expired, *entry == NULL
|
* CURLE_OPERATION_TIMEDOUT = timeout expired, *pdns == NULL
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_resolv(struct Curl_easy *data,
|
CURLcode Curl_resolv(struct Curl_easy *data,
|
||||||
uint8_t dns_queries,
|
uint8_t dns_queries,
|
||||||
|
|
@ -926,11 +926,11 @@ CURLcode Curl_resolv(struct Curl_easy *data,
|
||||||
uint8_t transport,
|
uint8_t transport,
|
||||||
timediff_t timeout_ms,
|
timediff_t timeout_ms,
|
||||||
uint32_t *presolv_id,
|
uint32_t *presolv_id,
|
||||||
struct Curl_dns_entry **entry)
|
struct Curl_dns_entry **pdns)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(hostname && *hostname);
|
DEBUGASSERT(hostname && *hostname);
|
||||||
*presolv_id = 0;
|
*presolv_id = 0;
|
||||||
*entry = NULL;
|
*pdns = NULL;
|
||||||
|
|
||||||
if(timeout_ms < 0)
|
if(timeout_ms < 0)
|
||||||
/* got an already expired timeout */
|
/* got an already expired timeout */
|
||||||
|
|
@ -945,7 +945,7 @@ CURLcode Curl_resolv(struct Curl_easy *data,
|
||||||
}
|
}
|
||||||
if(timeout_ms && !Curl_doh_wanted(data)) {
|
if(timeout_ms && !Curl_doh_wanted(data)) {
|
||||||
return resolv_alarm_timeout(data, dns_queries, hostname, port, transport,
|
return resolv_alarm_timeout(data, dns_queries, hostname, port, transport,
|
||||||
timeout_ms, presolv_id, entry);
|
timeout_ms, presolv_id, pdns);
|
||||||
}
|
}
|
||||||
#endif /* !USE_ALARM_TIMEOUT */
|
#endif /* !USE_ALARM_TIMEOUT */
|
||||||
|
|
||||||
|
|
@ -955,7 +955,7 @@ CURLcode Curl_resolv(struct Curl_easy *data,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return hostip_resolv(data, dns_queries, hostname, port, transport,
|
return hostip_resolv(data, dns_queries, hostname, port, transport,
|
||||||
timeout_ms, TRUE, presolv_id, entry);
|
timeout_ms, TRUE, presolv_id, pdns);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_CURL_ASYNC
|
#ifdef USE_CURL_ASYNC
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ struct ldap_urldesc {
|
||||||
|
|
||||||
static curl_ldap_num_t ldap_url_parse_low(struct Curl_easy *data,
|
static curl_ldap_num_t ldap_url_parse_low(struct Curl_easy *data,
|
||||||
const struct connectdata *conn,
|
const struct connectdata *conn,
|
||||||
LDAPURLDesc **ludp);
|
LDAPURLDesc **ludpp);
|
||||||
static void ldap_free_urldesc_low(LDAPURLDesc *ludp);
|
static void ldap_free_urldesc_low(LDAPURLDesc *ludp);
|
||||||
|
|
||||||
#undef ldap_free_urldesc
|
#undef ldap_free_urldesc
|
||||||
|
|
|
||||||
|
|
@ -1071,7 +1071,7 @@ static int addbyter(unsigned char outc, void *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
|
int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
|
||||||
va_list ap_save)
|
va_list args)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
struct nsprintf info;
|
struct nsprintf info;
|
||||||
|
|
@ -1080,7 +1080,7 @@ int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
|
||||||
info.length = 0;
|
info.length = 0;
|
||||||
info.max = maxlength;
|
info.max = maxlength;
|
||||||
|
|
||||||
retcode = formatf(&info, addbyter, format, ap_save);
|
retcode = formatf(&info, addbyter, format, args);
|
||||||
if(info.max) {
|
if(info.max) {
|
||||||
/* we terminate this with a zero byte */
|
/* we terminate this with a zero byte */
|
||||||
if(info.max == info.length) {
|
if(info.max == info.length) {
|
||||||
|
|
@ -1098,10 +1098,10 @@ int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
|
||||||
int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...)
|
int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
va_list ap_save; /* argument pointer */
|
va_list args; /* argument pointer */
|
||||||
va_start(ap_save, format);
|
va_start(args, format);
|
||||||
retcode = curl_mvsnprintf(buffer, maxlength, format, ap_save);
|
retcode = curl_mvsnprintf(buffer, maxlength, format, args);
|
||||||
va_end(ap_save);
|
va_end(args);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1118,13 +1118,13 @@ static int alloc_addbyter(unsigned char outc, void *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* appends the formatted string, returns MERR error code */
|
/* appends the formatted string, returns MERR error code */
|
||||||
int curlx_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list ap_save)
|
int curlx_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
struct asprintf info;
|
struct asprintf info;
|
||||||
info.b = dyn;
|
info.b = dyn;
|
||||||
info.merr = MERR_OK;
|
info.merr = MERR_OK;
|
||||||
|
|
||||||
(void)formatf(&info, alloc_addbyter, format, ap_save);
|
(void)formatf(&info, alloc_addbyter, format, args);
|
||||||
if(info.merr) {
|
if(info.merr) {
|
||||||
curlx_dyn_free(info.b);
|
curlx_dyn_free(info.b);
|
||||||
return info.merr;
|
return info.merr;
|
||||||
|
|
@ -1132,7 +1132,7 @@ int curlx_dyn_vprintf(struct dynbuf *dyn, const char *format, va_list ap_save)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *curl_mvaprintf(const char *format, va_list ap_save)
|
char *curl_mvaprintf(const char *format, va_list args)
|
||||||
{
|
{
|
||||||
struct asprintf info;
|
struct asprintf info;
|
||||||
struct dynbuf dyn;
|
struct dynbuf dyn;
|
||||||
|
|
@ -1140,7 +1140,7 @@ char *curl_mvaprintf(const char *format, va_list ap_save)
|
||||||
curlx_dyn_init(info.b, DYN_APRINTF);
|
curlx_dyn_init(info.b, DYN_APRINTF);
|
||||||
info.merr = MERR_OK;
|
info.merr = MERR_OK;
|
||||||
|
|
||||||
(void)formatf(&info, alloc_addbyter, format, ap_save);
|
(void)formatf(&info, alloc_addbyter, format, args);
|
||||||
if(info.merr) {
|
if(info.merr) {
|
||||||
curlx_dyn_free(info.b);
|
curlx_dyn_free(info.b);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -1152,11 +1152,11 @@ char *curl_mvaprintf(const char *format, va_list ap_save)
|
||||||
|
|
||||||
char *curl_maprintf(const char *format, ...)
|
char *curl_maprintf(const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap_save;
|
va_list args;
|
||||||
char *s;
|
char *s;
|
||||||
va_start(ap_save, format);
|
va_start(args, format);
|
||||||
s = curl_mvaprintf(format, ap_save);
|
s = curl_mvaprintf(format, args);
|
||||||
va_end(ap_save);
|
va_end(args);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1170,11 +1170,11 @@ static int storebuffer(unsigned char outc, void *f)
|
||||||
|
|
||||||
int curl_msprintf(char *buffer, const char *format, ...)
|
int curl_msprintf(char *buffer, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list ap_save; /* argument pointer */
|
va_list args; /* argument pointer */
|
||||||
int retcode;
|
int retcode;
|
||||||
va_start(ap_save, format);
|
va_start(args, format);
|
||||||
retcode = formatf(&buffer, storebuffer, format, ap_save);
|
retcode = formatf(&buffer, storebuffer, format, args);
|
||||||
va_end(ap_save);
|
va_end(args);
|
||||||
*buffer = 0; /* we terminate this with a zero byte */
|
*buffer = 0; /* we terminate this with a zero byte */
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
@ -1190,36 +1190,36 @@ static int fputc_wrapper(unsigned char outc, void *f)
|
||||||
int curl_mprintf(const char *format, ...)
|
int curl_mprintf(const char *format, ...)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
va_list ap_save; /* argument pointer */
|
va_list args; /* argument pointer */
|
||||||
va_start(ap_save, format);
|
va_start(args, format);
|
||||||
retcode = formatf(stdout, fputc_wrapper, format, ap_save);
|
retcode = formatf(stdout, fputc_wrapper, format, args);
|
||||||
va_end(ap_save);
|
va_end(args);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mfprintf(FILE *whereto, const char *format, ...)
|
int curl_mfprintf(FILE *fd, const char *format, ...)
|
||||||
{
|
{
|
||||||
int retcode;
|
int retcode;
|
||||||
va_list ap_save; /* argument pointer */
|
va_list args; /* argument pointer */
|
||||||
va_start(ap_save, format);
|
va_start(args, format);
|
||||||
retcode = formatf(whereto, fputc_wrapper, format, ap_save);
|
retcode = formatf(fd, fputc_wrapper, format, args);
|
||||||
va_end(ap_save);
|
va_end(args);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mvsprintf(char *buffer, const char *format, va_list ap_save)
|
int curl_mvsprintf(char *buffer, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
int retcode = formatf(&buffer, storebuffer, format, ap_save);
|
int retcode = formatf(&buffer, storebuffer, format, args);
|
||||||
*buffer = 0; /* we terminate this with a zero byte */
|
*buffer = 0; /* we terminate this with a zero byte */
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mvprintf(const char *format, va_list ap_save)
|
int curl_mvprintf(const char *format, va_list args)
|
||||||
{
|
{
|
||||||
return formatf(stdout, fputc_wrapper, format, ap_save);
|
return formatf(stdout, fputc_wrapper, format, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
int curl_mvfprintf(FILE *whereto, const char *format, va_list ap_save)
|
int curl_mvfprintf(FILE *fd, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
return formatf(whereto, fputc_wrapper, format, ap_save);
|
return formatf(fd, fputc_wrapper, format, args);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
lib/multi.c
22
lib/multi.c
|
|
@ -453,11 +453,11 @@ static CURLMcode multi_xfers_add(struct Curl_multi *multi,
|
||||||
return CURLM_OK;
|
return CURLM_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_add_handle(CURLM *m, CURL *d)
|
CURLMcode curl_multi_add_handle(CURLM *m, CURL *curl)
|
||||||
{
|
{
|
||||||
CURLMcode mresult;
|
CURLMcode mresult;
|
||||||
struct Curl_multi *multi = m;
|
struct Curl_multi *multi = m;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
|
|
||||||
/* First, make some basic checks that the CURLM handle is a good handle */
|
/* First, make some basic checks that the CURLM handle is a good handle */
|
||||||
if(!GOOD_MULTI_HANDLE(multi))
|
if(!GOOD_MULTI_HANDLE(multi))
|
||||||
|
|
@ -775,10 +775,10 @@ static void close_connect_only(struct connectdata *conn,
|
||||||
connclose(conn, "Removing connect-only easy handle");
|
connclose(conn, "Removing connect-only easy handle");
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_remove_handle(CURLM *m, CURL *d)
|
CURLMcode curl_multi_remove_handle(CURLM *m, CURL *curl)
|
||||||
{
|
{
|
||||||
struct Curl_multi *multi = m;
|
struct Curl_multi *multi = m;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
bool premature;
|
bool premature;
|
||||||
struct Curl_llist_node *e;
|
struct Curl_llist_node *e;
|
||||||
CURLMcode mresult;
|
CURLMcode mresult;
|
||||||
|
|
@ -1655,22 +1655,22 @@ out:
|
||||||
return mresult;
|
return mresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_wait(CURLM *multi,
|
CURLMcode curl_multi_wait(CURLM *m,
|
||||||
struct curl_waitfd extra_fds[],
|
struct curl_waitfd extra_fds[],
|
||||||
unsigned int extra_nfds,
|
unsigned int extra_nfds,
|
||||||
int timeout_ms,
|
int timeout_ms,
|
||||||
int *ret)
|
int *ret)
|
||||||
{
|
{
|
||||||
return multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, FALSE);
|
return multi_wait(m, extra_fds, extra_nfds, timeout_ms, ret, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_poll(CURLM *multi,
|
CURLMcode curl_multi_poll(CURLM *m,
|
||||||
struct curl_waitfd extra_fds[],
|
struct curl_waitfd extra_fds[],
|
||||||
unsigned int extra_nfds,
|
unsigned int extra_nfds,
|
||||||
int timeout_ms,
|
int timeout_ms,
|
||||||
int *ret)
|
int *ret)
|
||||||
{
|
{
|
||||||
return multi_wait(multi, extra_fds, extra_nfds, timeout_ms, ret, TRUE);
|
return multi_wait(m, extra_fds, extra_nfds, timeout_ms, ret, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_wakeup(CURLM *m)
|
CURLMcode curl_multi_wakeup(CURLM *m)
|
||||||
|
|
@ -3723,14 +3723,14 @@ void Curl_expire_clear(struct Curl_easy *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLMcode curl_multi_assign(CURLM *m, curl_socket_t s,
|
CURLMcode curl_multi_assign(CURLM *m, curl_socket_t sockfd,
|
||||||
void *hashp)
|
void *sockp)
|
||||||
{
|
{
|
||||||
struct Curl_multi *multi = m;
|
struct Curl_multi *multi = m;
|
||||||
if(!GOOD_MULTI_HANDLE(multi))
|
if(!GOOD_MULTI_HANDLE(multi))
|
||||||
return CURLM_BAD_HANDLE;
|
return CURLM_BAD_HANDLE;
|
||||||
|
|
||||||
return Curl_multi_ev_assign(multi, s, hashp);
|
return Curl_multi_ev_assign(multi, sockfd, sockp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void move_pending_to_connect(struct Curl_multi *multi,
|
static void move_pending_to_connect(struct Curl_multi *multi,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
CURLcode Curl_rand_bytes(struct Curl_easy *data,
|
CURLcode Curl_rand_bytes(struct Curl_easy *data,
|
||||||
#ifdef DEBUGBUILD
|
#ifdef DEBUGBUILD
|
||||||
bool allow_env_override,
|
bool env_override,
|
||||||
#endif
|
#endif
|
||||||
unsigned char *rnd, size_t num);
|
unsigned char *rnd, size_t num);
|
||||||
|
|
||||||
|
|
|
||||||
10
lib/setopt.c
10
lib/setopt.c
|
|
@ -2901,21 +2901,21 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef curl_easy_setopt
|
#undef curl_easy_setopt
|
||||||
CURLcode curl_easy_setopt(CURL *d, CURLoption tag, ...)
|
CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...)
|
||||||
{
|
{
|
||||||
va_list arg;
|
va_list arg;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
|
|
||||||
if(!data)
|
if(!data)
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
||||||
va_start(arg, tag);
|
va_start(arg, option);
|
||||||
|
|
||||||
result = Curl_vsetopt(data, tag, arg);
|
result = Curl_vsetopt(data, option, arg);
|
||||||
|
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
if(result == CURLE_BAD_FUNCTION_ARGUMENT)
|
if(result == CURLE_BAD_FUNCTION_ARGUMENT)
|
||||||
failf(data, "setopt 0x%x got bad argument", tag);
|
failf(data, "setopt 0x%x got bad argument", option);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
const char *userp,
|
const char *userp,
|
||||||
const char *passwdp,
|
const char *passwdp,
|
||||||
const char *service,
|
const char *service,
|
||||||
const char *hostname,
|
const char *host,
|
||||||
struct ntlmdata *ntlm,
|
struct ntlmdata *ntlm,
|
||||||
struct bufref *out)
|
struct bufref *out)
|
||||||
{
|
{
|
||||||
|
|
@ -445,7 +445,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
char *ntlmbuf;
|
char *ntlmbuf;
|
||||||
const char *host = ""; /* empty */
|
const char *hostname = ""; /* empty */
|
||||||
const char *domain = ""; /* empty */
|
const char *domain = ""; /* empty */
|
||||||
size_t hostlen = 0;
|
size_t hostlen = 0;
|
||||||
size_t domlen = 0;
|
size_t domlen = 0;
|
||||||
|
|
@ -456,7 +456,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
(void)userp;
|
(void)userp;
|
||||||
(void)passwdp;
|
(void)passwdp;
|
||||||
(void)service;
|
(void)service;
|
||||||
(void)hostname;
|
(void)host;
|
||||||
|
|
||||||
/* Clean up any former leftovers and initialise to defaults */
|
/* Clean up any former leftovers and initialise to defaults */
|
||||||
Curl_auth_cleanup_ntlm(ntlm);
|
Curl_auth_cleanup_ntlm(ntlm);
|
||||||
|
|
@ -490,7 +490,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
SHORTPAIR(hostlen),
|
SHORTPAIR(hostlen),
|
||||||
SHORTPAIR(hostoff),
|
SHORTPAIR(hostoff),
|
||||||
0, 0,
|
0, 0,
|
||||||
host, /* this is empty */
|
hostname, /* this is empty */
|
||||||
domain /* this is empty */);
|
domain /* this is empty */);
|
||||||
|
|
||||||
if(!ntlmbuf)
|
if(!ntlmbuf)
|
||||||
|
|
|
||||||
|
|
@ -191,21 +191,21 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
* Returns CURLE_OK on success.
|
* Returns CURLE_OK on success.
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
|
CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
|
||||||
const struct bufref *type2,
|
const struct bufref *type2ref,
|
||||||
struct ntlmdata *ntlm)
|
struct ntlmdata *ntlm)
|
||||||
{
|
{
|
||||||
/* Ensure we have a valid type-2 message */
|
/* Ensure we have a valid type-2 message */
|
||||||
if(!Curl_bufref_len(type2)) {
|
if(!Curl_bufref_len(type2ref)) {
|
||||||
infof(data, "NTLM handshake failure (empty type-2 message)");
|
infof(data, "NTLM handshake failure (empty type-2 message)");
|
||||||
return CURLE_BAD_CONTENT_ENCODING;
|
return CURLE_BAD_CONTENT_ENCODING;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store the challenge for later use */
|
/* Store the challenge for later use */
|
||||||
ntlm->input_token = curlx_memdup0(Curl_bufref_ptr(type2),
|
ntlm->input_token = curlx_memdup0(Curl_bufref_ptr(type2ref),
|
||||||
Curl_bufref_len(type2));
|
Curl_bufref_len(type2ref));
|
||||||
if(!ntlm->input_token)
|
if(!ntlm->input_token)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
ntlm->input_token_len = Curl_bufref_len(type2);
|
ntlm->input_token_len = Curl_bufref_len(type2ref);
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
||||||
const char *userp,
|
const char *userp,
|
||||||
const char *passwdp,
|
const char *passwdp,
|
||||||
const char *service,
|
const char *service,
|
||||||
const char *hostname,
|
const char *host,
|
||||||
struct ntlmdata *ntlm,
|
struct ntlmdata *ntlm,
|
||||||
struct bufref *out);
|
struct bufref *out);
|
||||||
|
|
||||||
|
|
@ -263,7 +263,7 @@ CURLcode Curl_auth_create_gssapi_user_message(struct Curl_easy *data,
|
||||||
const char *passwdp,
|
const char *passwdp,
|
||||||
const char *service,
|
const char *service,
|
||||||
const char *host,
|
const char *host,
|
||||||
const bool mutual,
|
const bool mutual_auth,
|
||||||
const struct bufref *chlg,
|
const struct bufref *chlg,
|
||||||
struct kerberos5data *krb5,
|
struct kerberos5data *krb5,
|
||||||
struct bufref *out);
|
struct bufref *out);
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ CURLcode Curl_gtls_ctx_init(struct gtls_ctx *gctx,
|
||||||
struct Curl_cfilter *cf,
|
struct Curl_cfilter *cf,
|
||||||
struct Curl_easy *data,
|
struct Curl_easy *data,
|
||||||
struct ssl_peer *peer,
|
struct ssl_peer *peer,
|
||||||
const struct alpn_spec *alpns,
|
const struct alpn_spec *alpns_requested,
|
||||||
Curl_gtls_ctx_setup_cb *cb_setup,
|
Curl_gtls_ctx_setup_cb *cb_setup,
|
||||||
void *cb_user_data,
|
void *cb_user_data,
|
||||||
void *ssl_user_data,
|
void *ssl_user_data,
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ CURLcode Curl_wssl_ctx_init(struct wssl_ctx *wctx,
|
||||||
struct Curl_cfilter *cf,
|
struct Curl_cfilter *cf,
|
||||||
struct Curl_easy *data,
|
struct Curl_easy *data,
|
||||||
struct ssl_peer *peer,
|
struct ssl_peer *peer,
|
||||||
const struct alpn_spec *alpns,
|
const struct alpn_spec *alpns_requested,
|
||||||
Curl_wssl_ctx_setup_cb *cb_setup,
|
Curl_wssl_ctx_setup_cb *cb_setup,
|
||||||
void *cb_user_data,
|
void *cb_user_data,
|
||||||
void *ssl_user_data,
|
void *ssl_user_data,
|
||||||
|
|
|
||||||
28
lib/ws.c
28
lib/ws.c
|
|
@ -1527,16 +1527,16 @@ static CURLcode nw_in_recv(void *reader_ctx,
|
||||||
return curl_easy_recv(data, buf, buflen, pnread);
|
return curl_easy_recv(data, buf, buflen, pnread);
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode curl_ws_recv(CURL *d, void *buffer,
|
CURLcode curl_ws_recv(CURL *curl, void *buffer,
|
||||||
size_t buflen, size_t *nread,
|
size_t buflen, size_t *recv,
|
||||||
const struct curl_ws_frame **metap)
|
const struct curl_ws_frame **metap)
|
||||||
{
|
{
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
struct connectdata *conn;
|
struct connectdata *conn;
|
||||||
struct websocket *ws;
|
struct websocket *ws;
|
||||||
struct ws_collect ctx;
|
struct ws_collect ctx;
|
||||||
|
|
||||||
*nread = 0;
|
*recv = 0;
|
||||||
*metap = NULL;
|
*metap = NULL;
|
||||||
if(!GOOD_EASY_HANDLE(data) || (buflen && !buffer))
|
if(!GOOD_EASY_HANDLE(data) || (buflen && !buffer))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
@ -1609,10 +1609,10 @@ CURLcode curl_ws_recv(CURL *d, void *buffer,
|
||||||
update_meta(ws, ctx.frame_age, ctx.frame_flags, ctx.payload_offset,
|
update_meta(ws, ctx.frame_age, ctx.frame_flags, ctx.payload_offset,
|
||||||
ctx.payload_len, ctx.bufidx);
|
ctx.payload_len, ctx.bufidx);
|
||||||
*metap = &ws->recvframe;
|
*metap = &ws->recvframe;
|
||||||
*nread = ws->recvframe.len;
|
*recv = ws->recvframe.len;
|
||||||
CURL_TRC_WS(data, "curl_ws_recv(len=%zu) -> %zu bytes (frame at %"
|
CURL_TRC_WS(data, "curl_ws_recv(len=%zu) -> %zu bytes (frame at %"
|
||||||
FMT_OFF_T ", %" FMT_OFF_T " left)",
|
FMT_OFF_T ", %" FMT_OFF_T " left)",
|
||||||
buflen, *nread, ws->recvframe.offset,
|
buflen, *recv, ws->recvframe.offset,
|
||||||
ws->recvframe.bytesleft);
|
ws->recvframe.bytesleft);
|
||||||
/* all's well, try to send any pending control. we do not know
|
/* all's well, try to send any pending control. we do not know
|
||||||
* when the application will call `curl_ws_send()` again. */
|
* when the application will call `curl_ws_send()` again. */
|
||||||
|
|
@ -1763,7 +1763,7 @@ static CURLcode ws_send_raw(struct Curl_easy *data, const void *buffer,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode curl_ws_send(CURL *d, const void *buffer_arg,
|
CURLcode curl_ws_send(CURL *curl, const void *buffer_arg,
|
||||||
size_t buflen, size_t *sent,
|
size_t buflen, size_t *sent,
|
||||||
curl_off_t fragsize,
|
curl_off_t fragsize,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
|
|
@ -1771,7 +1771,7 @@ CURLcode curl_ws_send(CURL *d, const void *buffer_arg,
|
||||||
struct websocket *ws;
|
struct websocket *ws;
|
||||||
const uint8_t *buffer = buffer_arg;
|
const uint8_t *buffer = buffer_arg;
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
size_t ndummy;
|
size_t ndummy;
|
||||||
size_t *pnsent = sent ? sent : &ndummy;
|
size_t *pnsent = sent ? sent : &ndummy;
|
||||||
|
|
||||||
|
|
@ -1851,11 +1851,11 @@ static CURLcode ws_setup_conn(struct Curl_easy *data,
|
||||||
return Curl_http_setup_conn(data, conn);
|
return Curl_http_setup_conn(data, conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct curl_ws_frame *curl_ws_meta(CURL *d)
|
const struct curl_ws_frame *curl_ws_meta(CURL *curl)
|
||||||
{
|
{
|
||||||
/* we only return something for websocket, called from within the callback
|
/* we only return something for websocket, called from within the callback
|
||||||
when not using raw mode */
|
when not using raw mode */
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
if(GOOD_EASY_HANDLE(data) && Curl_is_in_callback(data) &&
|
if(GOOD_EASY_HANDLE(data) && Curl_is_in_callback(data) &&
|
||||||
data->conn && !data->set.ws_raw_mode) {
|
data->conn && !data->set.ws_raw_mode) {
|
||||||
struct websocket *ws;
|
struct websocket *ws;
|
||||||
|
|
@ -1866,13 +1866,13 @@ const struct curl_ws_frame *curl_ws_meta(CURL *d)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURL_EXTERN CURLcode curl_ws_start_frame(CURL *d,
|
CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
|
||||||
unsigned int flags,
|
unsigned int flags,
|
||||||
curl_off_t frame_len)
|
curl_off_t frame_len)
|
||||||
{
|
{
|
||||||
struct websocket *ws;
|
struct websocket *ws;
|
||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct Curl_easy *data = d;
|
struct Curl_easy *data = curl;
|
||||||
|
|
||||||
if(!GOOD_EASY_HANDLE(data))
|
if(!GOOD_EASY_HANDLE(data))
|
||||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||||
|
|
@ -1941,13 +1941,13 @@ const struct Curl_protocol Curl_protocol_ws = {
|
||||||
#else
|
#else
|
||||||
|
|
||||||
CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
|
CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
|
||||||
size_t *nread,
|
size_t *recv,
|
||||||
const struct curl_ws_frame **metap)
|
const struct curl_ws_frame **metap)
|
||||||
{
|
{
|
||||||
(void)curl;
|
(void)curl;
|
||||||
(void)buffer;
|
(void)buffer;
|
||||||
(void)buflen;
|
(void)buflen;
|
||||||
(void)nread;
|
(void)recv;
|
||||||
(void)metap;
|
(void)metap;
|
||||||
return CURLE_NOT_BUILT_IN;
|
return CURLE_NOT_BUILT_IN;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,6 @@
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "tool_setup.h"
|
#include "tool_setup.h"
|
||||||
|
|
||||||
CURLcode create_dir_hierarchy(const char *outfileo);
|
CURLcode create_dir_hierarchy(const char *outfile);
|
||||||
|
|
||||||
#endif /* HEADER_CURL_TOOL_DIRHIE_H */
|
#endif /* HEADER_CURL_TOOL_DIRHIE_H */
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ ParameterError str2unummax(long *val, const char *str, long max)
|
||||||
* data.
|
* data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ParameterError secs2ms(long *valp, const char *str)
|
ParameterError secs2ms(long *val, const char *str)
|
||||||
{
|
{
|
||||||
curl_off_t secs;
|
curl_off_t secs;
|
||||||
long ms = 0;
|
long ms = 0;
|
||||||
|
|
@ -326,7 +326,7 @@ ParameterError secs2ms(long *valp, const char *str)
|
||||||
ms = ((long)fracs * 100) / digs[len - 1];
|
ms = ((long)fracs * 100) / digs[len - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
*valp = ((long)secs * 1000) + ms;
|
*val = ((long)secs * 1000) + ms;
|
||||||
return PARAM_OK;
|
return PARAM_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ extern const struct NameValueUnsigned setopt_nv_CURLHSTS[];
|
||||||
/* Intercept setopt calls for --libcurl */
|
/* Intercept setopt calls for --libcurl */
|
||||||
|
|
||||||
CURLcode tool_setopt_enum(CURL *curl, const char *name, CURLoption tag,
|
CURLcode tool_setopt_enum(CURL *curl, const char *name, CURLoption tag,
|
||||||
const struct NameValue *nv, long lval);
|
const struct NameValue *nvlist, long lval);
|
||||||
CURLcode tool_setopt_SSLVERSION(CURL *curl, const char *name, CURLoption tag,
|
CURLcode tool_setopt_SSLVERSION(CURL *curl, const char *name, CURLoption tag,
|
||||||
long lval);
|
long lval);
|
||||||
CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config,
|
CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config,
|
||||||
|
|
@ -86,7 +86,8 @@ CURLcode tool_setopt_flags(CURL *curl, struct OperationConfig *config,
|
||||||
const struct NameValue *nv, long lval);
|
const struct NameValue *nv, long lval);
|
||||||
CURLcode tool_setopt_bitmask(CURL *curl,
|
CURLcode tool_setopt_bitmask(CURL *curl,
|
||||||
const char *name, CURLoption tag,
|
const char *name, CURLoption tag,
|
||||||
const struct NameValueUnsigned *nv, long lval);
|
const struct NameValueUnsigned *nvlist,
|
||||||
|
long lval);
|
||||||
CURLcode tool_setopt_mimepost(CURL *curl, struct OperationConfig *config,
|
CURLcode tool_setopt_mimepost(CURL *curl, struct OperationConfig *config,
|
||||||
const char *name, CURLoption tag,
|
const char *name, CURLoption tag,
|
||||||
curl_mime *mimepost);
|
curl_mime *mimepost);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue