cookies: change argument type for Curl_flush_cookies
The second argument is really a 'bool' so use that and pass in TRUE/FALSE to make it clear. Closes #4455
This commit is contained in:
parent
8a00560de2
commit
249541f12f
@ -1617,7 +1617,7 @@ struct curl_slist *Curl_cookie_list(struct Curl_easy *data)
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Curl_flush_cookies(struct Curl_easy *data, int cleanup)
|
void Curl_flush_cookies(struct Curl_easy *data, bool cleanup)
|
||||||
{
|
{
|
||||||
if(data->set.str[STRING_COOKIEJAR]) {
|
if(data->set.str[STRING_COOKIEJAR]) {
|
||||||
if(data->change.cookielist) {
|
if(data->change.cookielist) {
|
||||||
|
|||||||
@ -109,7 +109,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies);
|
|||||||
#define Curl_cookie_cleanup(x) Curl_nop_stmt
|
#define Curl_cookie_cleanup(x) Curl_nop_stmt
|
||||||
#define Curl_flush_cookies(x,y) Curl_nop_stmt
|
#define Curl_flush_cookies(x,y) Curl_nop_stmt
|
||||||
#else
|
#else
|
||||||
void Curl_flush_cookies(struct Curl_easy *data, int cleanup);
|
void Curl_flush_cookies(struct Curl_easy *data, bool cleanup);
|
||||||
void Curl_cookie_cleanup(struct CookieInfo *);
|
void Curl_cookie_cleanup(struct CookieInfo *);
|
||||||
struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
|
struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
|
||||||
const char *, struct CookieInfo *, bool);
|
const char *, struct CookieInfo *, bool);
|
||||||
|
|||||||
@ -752,7 +752,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||||||
}
|
}
|
||||||
else if(strcasecompare(argptr, "FLUSH")) {
|
else if(strcasecompare(argptr, "FLUSH")) {
|
||||||
/* flush cookies to file, takes care of the locking */
|
/* flush cookies to file, takes care of the locking */
|
||||||
Curl_flush_cookies(data, 0);
|
Curl_flush_cookies(data, FALSE);
|
||||||
}
|
}
|
||||||
else if(strcasecompare(argptr, "RELOAD")) {
|
else if(strcasecompare(argptr, "RELOAD")) {
|
||||||
/* reload cookies from file */
|
/* reload cookies from file */
|
||||||
|
|||||||
@ -374,7 +374,7 @@ CURLcode Curl_close(struct Curl_easy *data)
|
|||||||
Curl_safefree(data->state.buffer);
|
Curl_safefree(data->state.buffer);
|
||||||
Curl_safefree(data->state.headerbuff);
|
Curl_safefree(data->state.headerbuff);
|
||||||
Curl_safefree(data->state.ulbuf);
|
Curl_safefree(data->state.ulbuf);
|
||||||
Curl_flush_cookies(data, 1);
|
Curl_flush_cookies(data, TRUE);
|
||||||
#ifdef USE_ALTSVC
|
#ifdef USE_ALTSVC
|
||||||
Curl_altsvc_save(data->asi, data->set.str[STRING_ALTSVC]);
|
Curl_altsvc_save(data->asi, data->set.str[STRING_ALTSVC]);
|
||||||
Curl_altsvc_cleanup(data->asi);
|
Curl_altsvc_cleanup(data->asi);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user