ssl session caching: fix compiler warnings

This commit is contained in:
Yang Tse
2012-01-18 23:39:30 +01:00
parent d1becc3231
commit d56b4c3f89
7 changed files with 39 additions and 53 deletions

View File

@@ -683,7 +683,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set)
set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
/* Set the default size of the SSL session ID cache */
set->ssl.numsessions = 5;
set->ssl.max_ssl_sessions = 5;
set->proxyport = CURL_DEFAULT_PROXY_PORT; /* from url.h */
set->proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
@@ -2106,10 +2106,8 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->cookies = NULL;
#endif
if(data->share->sslsession == data->state.session) {
if(data->share->sslsession == data->state.session)
data->state.session = NULL;
data->set.ssl.numsessions = 0;
}
data->share->dirty--;
@@ -2143,7 +2141,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
}
#endif /* CURL_DISABLE_HTTP */
if(data->share->sslsession) {
data->set.ssl.numsessions = data->share->nsslsession;
data->set.ssl.max_ssl_sessions = data->share->max_ssl_sessions;
data->state.session = data->share->sslsession;
}
Curl_share_unlock(data, CURL_LOCK_DATA_SHARE);