diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2020-06-23 21:41:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-24 11:55:09 (GMT) |
commit | 5717fdc114a704cddae629e20e6588191360e98a (patch) | |
tree | 36545299412c5cafb4d3e3eb464598af465ea4c8 /lib/share.c | |
parent | 735ea3001ae98636a4cb7caf15a40960c0da39a1 (diff) | |
download | CMake-5717fdc114a704cddae629e20e6588191360e98a.zip CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.gz CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.bz2 |
curl 2020-06-23 (e9db32a0)
Code extracted from:
https://github.com/curl/curl.git
at commit e9db32a09af03f27e86d1251a9e68e9b7486d371 (curl-7_71_0).
Diffstat (limited to 'lib/share.c')
-rw-r--r-- | lib/share.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/share.c b/lib/share.c index 3d51086..a2d8960 100644 --- a/lib/share.c +++ b/lib/share.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -70,7 +70,7 @@ curl_share_setopt(struct Curl_share *share, CURLSHoption option, ...) case CURLSHOPT_SHARE: /* this is a type this share will share */ type = va_arg(param, int); - share->specifier |= (1<<type); + switch(type) { case CURL_LOCK_DATA_DNS: break; @@ -102,7 +102,7 @@ curl_share_setopt(struct Curl_share *share, CURLSHoption option, ...) #endif break; - case CURL_LOCK_DATA_CONNECT: /* not supported (yet) */ + case CURL_LOCK_DATA_CONNECT: if(Curl_conncache_init(&share->conn_cache, 103)) res = CURLSHE_NOMEM; break; @@ -116,6 +116,8 @@ curl_share_setopt(struct Curl_share *share, CURLSHoption option, ...) default: res = CURLSHE_BAD_OPTION; } + if(!res) + share->specifier |= (1<<type); break; case CURLSHOPT_UNSHARE: |