Skip to content

Commit

Permalink
delete CURLSHOPT_MAXCOOKIES
Browse files Browse the repository at this point in the history
  • Loading branch information
aYasuharuYamada committed May 10, 2013
1 parent e4f8418 commit 7fdf38c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
5 changes: 0 additions & 5 deletions docs/libcurl/curl_share_setopt.3
Expand Up @@ -77,11 +77,6 @@ the same as those for \fICURLSHOPT_SHARE\fP.
.IP CURLSHOPT_USERDATA
The \fIparameter\fP allows you to specify a pointer to data that will be passed
to the lock_function and unlock_function each time it is called.
.IP CURLSHOPT_MAXCOOKIES
Pass a long. The set number will be the maximam number of cookies.
If that many cookies received, this will delete the oldest access cookie.
Set it to 0 for an infinite number of cookies (which is the default).
(Added in 7.3x.x)
.SH RETURN VALUE
CURLSHE_OK (zero) means that the option was set properly, non-zero means an
error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
Expand Down
1 change: 0 additions & 1 deletion include/curl/curl.h
Expand Up @@ -2081,7 +2081,6 @@ typedef enum {
CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock
callback functions */
CURLSHOPT_MAXCOOKIES, /* set number of maximam cookies, 0 means no limit */
CURLSHOPT_LAST /* never use */
} CURLSHoption;

Expand Down
11 changes: 0 additions & 11 deletions lib/share.c
Expand Up @@ -165,17 +165,6 @@ curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
share->clientdata = ptr;
break;

case CURLSHOPT_MAXCOOKIES:
value = va_arg(param, long);
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
if(share->cookies && 0 <= value) {
share->cookies->maxcookies = value;
}
#else /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
res = CURLSHE_NOT_BUILT_IN;
#endif
break;

default:
res = CURLSHE_BAD_OPTION;
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/url.c
Expand Up @@ -1181,7 +1181,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
if(arg < 0)
break;
data->set.maxcookies = arg;
if(data->cookies && (!data->share || data->share->cookies != data->cookies))
if(data->cookies)
data->cookies->maxcookies = arg;
break;

Expand Down

0 comments on commit 7fdf38c

Please sign in to comment.